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