bgneal@312: /**
bgneal@312:  * editor_plugin_src.js
bgneal@312:  *
bgneal@312:  * Copyright 2009, Moxiecode Systems AB
bgneal@312:  * Released under LGPL License.
bgneal@312:  *
bgneal@312:  * License: http://tinymce.moxiecode.com/license
bgneal@312:  * Contributing: http://tinymce.moxiecode.com/contributing
bgneal@312:  */
bgneal@312: 
bgneal@312: (function() {
bgneal@312: 	tinymce.create('tinymce.plugins.IESpell', {
bgneal@312: 		init : function(ed, url) {
bgneal@312: 			var t = this, sp;
bgneal@312: 
bgneal@312: 			if (!tinymce.isIE)
bgneal@312: 				return;
bgneal@312: 
bgneal@312: 			t.editor = ed;
bgneal@312: 
bgneal@312: 			// Register commands
bgneal@312: 			ed.addCommand('mceIESpell', function() {
bgneal@312: 				try {
bgneal@312: 					sp = new ActiveXObject("ieSpell.ieSpellExtension");
bgneal@312: 					sp.CheckDocumentNode(ed.getDoc().documentElement);
bgneal@312: 				} catch (e) {
bgneal@312: 					if (e.number == -2146827859) {
bgneal@312: 						ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) {
bgneal@312: 							if (s)
bgneal@312: 								window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
bgneal@312: 						});
bgneal@312: 					} else
bgneal@312: 						ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number);
bgneal@312: 				}
bgneal@312: 			});
bgneal@312: 
bgneal@312: 			// Register buttons
bgneal@312: 			ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'});
bgneal@312: 		},
bgneal@312: 
bgneal@312: 		getInfo : function() {
bgneal@312: 			return {
bgneal@312: 				longname : 'IESpell (IE Only)',
bgneal@312: 				author : 'Moxiecode Systems AB',
bgneal@312: 				authorurl : 'http://tinymce.moxiecode.com',
bgneal@312: 				infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',
bgneal@312: 				version : tinymce.majorVersion + "." + tinymce.minorVersion
bgneal@312: 			};
bgneal@312: 		}
bgneal@312: 	});
bgneal@312: 
bgneal@312: 	// Register plugin
bgneal@312: 	tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell);
bgneal@312: })();