annotate WebContent/jscripts/tiny_mce/plugins/iespell/editor_plugin_src.js @ 10:0bdfe01e30b5

checking auth token works now.
author casties
date Tue, 20 Mar 2012 15:55:51 +0100
parents 0be9d53a6967
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
1 /**
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
2 * editor_plugin_src.js
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
3 *
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
4 * Copyright 2009, Moxiecode Systems AB
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
5 * Released under LGPL License.
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
6 *
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
7 * License: http://tinymce.moxiecode.com/license
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
8 * Contributing: http://tinymce.moxiecode.com/contributing
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
9 */
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
10
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
11 (function() {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
12 tinymce.create('tinymce.plugins.IESpell', {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
13 init : function(ed, url) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
14 var t = this, sp;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
15
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
16 if (!tinymce.isIE)
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
17 return;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
18
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
19 t.editor = ed;
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
20
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
21 // Register commands
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
22 ed.addCommand('mceIESpell', function() {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
23 try {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
24 sp = new ActiveXObject("ieSpell.ieSpellExtension");
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
25 sp.CheckDocumentNode(ed.getDoc().documentElement);
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
26 } catch (e) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
27 if (e.number == -2146827859) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
28 ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
29 if (s)
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
30 window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
31 });
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
32 } else
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
33 ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number);
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
34 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
35 });
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
36
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
37 // Register buttons
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
38 ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'});
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
39 },
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
40
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
41 getInfo : function() {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
42 return {
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
43 longname : 'IESpell (IE Only)',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
44 author : 'Moxiecode Systems AB',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
45 authorurl : 'http://tinymce.moxiecode.com',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
46 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
47 version : tinymce.majorVersion + "." + tinymce.minorVersion
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
48 };
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
49 }
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
50 });
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
51
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
52 // Register plugin
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
53 tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell);
0be9d53a6967 editor for annotations
dwinter
parents:
diff changeset
54 })();