root / static / js / tinymce / plugins / iespell / editor_plugin_src.js @ 6ecbf4ec
History | View | Annotate | Download (1.4 kB)
1 |
/**
|
---|---|
2 |
* editor_plugin_src.js
|
3 |
*
|
4 |
* Copyright 2009, Moxiecode Systems AB
|
5 |
* Released under LGPL License.
|
6 |
*
|
7 |
* License: http://tinymce.moxiecode.com/license
|
8 |
* Contributing: http://tinymce.moxiecode.com/contributing
|
9 |
*/
|
10 |
|
11 |
(function() {
|
12 |
tinymce.create('tinymce.plugins.IESpell', {
|
13 |
init : function(ed, url) { |
14 |
var t = this, sp; |
15 |
|
16 |
if (!tinymce.isIE)
|
17 |
return;
|
18 |
|
19 |
t.editor = ed; |
20 |
|
21 |
// Register commands
|
22 |
ed.addCommand('mceIESpell', function() { |
23 |
try {
|
24 |
sp = new ActiveXObject("ieSpell.ieSpellExtension"); |
25 |
sp.CheckDocumentNode(ed.getDoc().documentElement); |
26 |
} catch (e) {
|
27 |
if (e.number == -2146827859) { |
28 |
ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) { |
29 |
if (s)
|
30 |
window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); |
31 |
}); |
32 |
} else
|
33 |
ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number);
|
34 |
} |
35 |
}); |
36 |
|
37 |
// Register buttons
|
38 |
ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'}); |
39 |
}, |
40 |
|
41 |
getInfo : function() { |
42 |
return {
|
43 |
longname : 'IESpell (IE Only)', |
44 |
author : 'Moxiecode Systems AB', |
45 |
authorurl : 'http://tinymce.moxiecode.com', |
46 |
infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell', |
47 |
version : tinymce.majorVersion + "." + tinymce.minorVersion |
48 |
}; |
49 |
} |
50 |
}); |
51 |
|
52 |
// Register plugin
|
53 |
tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell);
|
54 |
})(); |