[ Index ]
 

Code source de Seagull 0.6.1

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/tinyfck/plugins/zoom/ -> editor_plugin_src.js (source)

   1  /**

   2   * $RCSfile: editor_plugin_src.js,v $

   3   * $Revision: 1.10 $

   4   * $Date: 2006/04/07 15:52:50 $

   5   *

   6   * @author Moxiecode

   7   * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.

   8   */
   9  
  10  var TinyMCE_ZoomPlugin = {
  11      getInfo : function() {
  12          return {
  13              longname : 'Zoom',
  14              author : 'Moxiecode Systems',
  15              authorurl : 'http://tinymce.moxiecode.com',
  16              infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_zoom.html',
  17              version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
  18          };
  19      },
  20  
  21      /**

  22       * Returns the HTML contents of the zoom control.

  23       */
  24      getControlHTML : function(control_name) {
  25          if (!tinyMCE.isMSIE || tinyMCE.isMSIE5_0 || tinyMCE.isOpera)
  26              return "";
  27  
  28          switch (control_name) {
  29              case "zoom":
  30                  return '<select id="{$editor_id}_zoomSelect" name="{$editor_id}_zoomSelect" onfocus="tinyMCE.addSelectAccessibility(event, this, window);" onchange="tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceZoom\',false,this.options[this.selectedIndex].value);" class="mceSelectList">' + 
  31                          '<option value="100%">+ 100%</option>' + 
  32                          '<option value="150%">+ 150%</option>' + 
  33                          '<option value="200%">+ 200%</option>' + 
  34                          '<option value="250%">+ 250%</option>' + 
  35                          '</select>';
  36          }
  37  
  38          return "";
  39      },
  40  
  41      /**

  42       * Executes the mceZoom command.

  43       */
  44      execCommand : function(editor_id, element, command, user_interface, value) {
  45          // Handle commands

  46          switch (command) {
  47              case "mceZoom":
  48                  tinyMCE.getInstanceById(editor_id).contentDocument.body.style.zoom = value;
  49                  tinyMCE.getInstanceById(editor_id).contentDocument.body.style.mozZoom = value;
  50                  return true;
  51          }
  52  
  53          // Pass to next handler in chain

  54          return false;
  55      }
  56  };
  57  
  58  tinyMCE.addPlugin("zoom", TinyMCE_ZoomPlugin);


Généré le : Fri Mar 30 01:27:52 2007 par Balluche grâce à PHPXref 0.7