]> code.citadel.org Git - citadel.git/blob - webcit/tiny_mce/plugins/iespell/editor_plugin_src.js
re-added binary
[citadel.git] / webcit / tiny_mce / plugins / iespell / editor_plugin_src.js
1 /* Import plugin specific language pack */\r
2 tinyMCE.importPluginLanguagePack('iespell', 'cs,el,en,fr_ca,it,ko,sv,zh_cn,fr,de,pl,pt_br,nl,da,he,no');\r
3 \r
4 function TinyMCE_iespell_getInfo() {\r
5         return {\r
6                 longname : 'IESpell',\r
7                 author : 'Moxiecode Systems',\r
8                 authorurl : 'http://tinymce.moxiecode.com',\r
9                 infourl : 'http://tinymce.moxiecode.com/tinymce/docs/plugin_iespell.html',\r
10                 version : tinyMCE.majorVersion + "." + tinyMCE.minorVersion\r
11         };\r
12 };\r
13 \r
14 /**\r
15  * Returns the HTML contents of the iespell control.\r
16  */\r
17 function TinyMCE_iespell_getControlHTML(control_name) {\r
18         // Is it the iespell control and is the brower MSIE.\r
19         if (control_name == "iespell" && tinyMCE.isMSIE)\r
20                 return '<a href="javascript:tinyMCE.execInstanceCommand(\'{$editor_id}\',\'mceIESpell\');" target="_self" onmousedown="return false;"><img id="{$editor_id}_iespell" src="{$pluginurl}/images/iespell.gif" title="{$lang_iespell_desc}" width="20" height="20" class="mceButtonNormal" onmouseover="tinyMCE.switchClass(this,\'mceButtonOver\');" onmouseout="tinyMCE.restoreClass(this);" onmousedown="tinyMCE.restoreAndSwitchClass(this,\'mceButtonDown\');" /></a>';\r
21 \r
22         return "";\r
23 }\r
24 \r
25 /**\r
26  * Executes the mceIESpell command.\r
27  */\r
28 function TinyMCE_iespell_execCommand(editor_id, element, command, user_interface, value) {\r
29         // Handle ieSpellCommand\r
30         if (command == "mceIESpell") {\r
31                 try {\r
32                         var ieSpell = new ActiveXObject("ieSpell.ieSpellExtension");\r
33                         ieSpell.CheckDocumentNode(tinyMCE.getInstanceById(editor_id).contentDocument.documentElement);\r
34                 } catch (e) {\r
35                         if (e.number == -2146827859) {\r
36                                 if (confirm(tinyMCE.getLang("lang_iespell_download", "", true)))\r
37                                         window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');\r
38                         } else\r
39                                 alert("Error Loading ieSpell: Exception " + e.number);\r
40                 }\r
41 \r
42                 return true;\r
43         }\r
44 \r
45         // Pass to next handler in chain\r
46         return false;\r
47 }