bgneal@45: /**
bgneal@45:  * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
bgneal@45:  *
bgneal@45:  * @author Moxiecode
bgneal@45:  * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
bgneal@45:  */
bgneal@45: 
bgneal@45: (function() {
bgneal@45: 	tinymce.create('tinymce.plugins.IESpell', {
bgneal@45: 		init : function(ed, url) {
bgneal@45: 			var t = this, sp;
bgneal@45: 
bgneal@45: 			if (!tinymce.isIE)
bgneal@45: 				return;
bgneal@45: 
bgneal@45: 			t.editor = ed;
bgneal@45: 
bgneal@45: 			// Register commands
bgneal@45: 			ed.addCommand('mceIESpell', function() {
bgneal@45: 				try {
bgneal@45: 					sp = new ActiveXObject("ieSpell.ieSpellExtension");
bgneal@45: 					sp.CheckDocumentNode(ed.getDoc().documentElement);
bgneal@45: 				} catch (e) {
bgneal@45: 					if (e.number == -2146827859) {
bgneal@45: 						ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) {
bgneal@45: 							if (s)
bgneal@45: 								window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
bgneal@45: 						});
bgneal@45: 					} else
bgneal@45: 						ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number);
bgneal@45: 				}
bgneal@45: 			});
bgneal@45: 
bgneal@45: 			// Register buttons
bgneal@45: 			ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'});
bgneal@45: 		},
bgneal@45: 
bgneal@45: 		getInfo : function() {
bgneal@45: 			return {
bgneal@45: 				longname : 'IESpell (IE Only)',
bgneal@45: 				author : 'Moxiecode Systems AB',
bgneal@45: 				authorurl : 'http://tinymce.moxiecode.com',
bgneal@45: 				infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',
bgneal@45: 				version : tinymce.majorVersion + "." + tinymce.minorVersion
bgneal@45: 			};
bgneal@45: 		}
bgneal@45: 	});
bgneal@45: 
bgneal@45: 	// Register plugin
bgneal@45: 	tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell);
bgneal@45: })();