[ Index ]
 

Code source de e107 0.7.8

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

title

Body

[fermer]

/e107_handlers/tiny_mce/plugins/iespell/ -> editor_plugin_src.js (source)

   1  /**
   2   * $Id: editor_plugin_src.js,v 1.9 2006/10/27 22:36:57 e107coders Exp $
   3   *
   4   * @author Moxiecode
   5   * @copyright Copyright © 2004-2006, Moxiecode Systems AB, All rights reserved.
   6   */
   7  
   8  /* Import plugin specific language pack */
   9  tinyMCE.importPluginLanguagePack('iespell');
  10  
  11  var TinyMCE_IESpellPlugin = {
  12      getInfo : function() {
  13          return {
  14              longname : 'IESpell (MSIE Only)',
  15              author : 'Moxiecode Systems AB',
  16              authorurl : 'http://tinymce.moxiecode.com',
  17              infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html',
  18              version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion
  19          };
  20      },
  21  
  22      /**
  23       * Returns the HTML contents of the iespell control.
  24       */
  25      getControlHTML : function(cn) {
  26          // Is it the iespell control and is the brower MSIE.
  27          if (cn == "iespell" && (tinyMCE.isMSIE && !tinyMCE.isOpera))
  28              return tinyMCE.getButtonHTML(cn, 'lang_iespell_desc', '{$pluginurl}/images/iespell.gif', 'mceIESpell');
  29  
  30          return "";
  31      },
  32  
  33      /**
  34       * Executes the mceIESpell command.
  35       */
  36      execCommand : function(editor_id, element, command, user_interface, value) {
  37          // Handle ieSpellCommand
  38          if (command == "mceIESpell") {
  39              try {
  40                  var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension");
  41                  ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);
  42              } catch (e) {
  43                  if (e.number == -2146827859) {
  44                      if (confirm(tinyMCE.getLang("lang_iespell_download", "", true)))
  45                          window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
  46                  } else
  47                      alert("Error Loading ieSpell: Exception " + e.number);
  48              }
  49  
  50              return true;
  51          }
  52  
  53          // Pass to next handler in chain
  54          return false;
  55      }
  56  };
  57  
  58  tinyMCE.addPlugin("iespell", TinyMCE_IESpellPlugin);


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7