annotate media/js/tiny_mce/plugins/iespell/editor_plugin_src.js @ 106:cb72577785df

Forums: implemented the edit post function.
author Brian Neal <bgneal@gmail.com>
date Sat, 19 Sep 2009 21:49:56 +0000
parents a5b4c5ce0658
children 149c3567fec1
rev   line source
bgneal@45 1 /**
bgneal@45 2 * $Id: editor_plugin_src.js 520 2008-01-07 16:30:32Z spocke $
bgneal@45 3 *
bgneal@45 4 * @author Moxiecode
bgneal@45 5 * @copyright Copyright © 2004-2008, Moxiecode Systems AB, All rights reserved.
bgneal@45 6 */
bgneal@45 7
bgneal@45 8 (function() {
bgneal@45 9 tinymce.create('tinymce.plugins.IESpell', {
bgneal@45 10 init : function(ed, url) {
bgneal@45 11 var t = this, sp;
bgneal@45 12
bgneal@45 13 if (!tinymce.isIE)
bgneal@45 14 return;
bgneal@45 15
bgneal@45 16 t.editor = ed;
bgneal@45 17
bgneal@45 18 // Register commands
bgneal@45 19 ed.addCommand('mceIESpell', function() {
bgneal@45 20 try {
bgneal@45 21 sp = new ActiveXObject("ieSpell.ieSpellExtension");
bgneal@45 22 sp.CheckDocumentNode(ed.getDoc().documentElement);
bgneal@45 23 } catch (e) {
bgneal@45 24 if (e.number == -2146827859) {
bgneal@45 25 ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) {
bgneal@45 26 if (s)
bgneal@45 27 window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
bgneal@45 28 });
bgneal@45 29 } else
bgneal@45 30 ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number);
bgneal@45 31 }
bgneal@45 32 });
bgneal@45 33
bgneal@45 34 // Register buttons
bgneal@45 35 ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'});
bgneal@45 36 },
bgneal@45 37
bgneal@45 38 getInfo : function() {
bgneal@45 39 return {
bgneal@45 40 longname : 'IESpell (IE Only)',
bgneal@45 41 author : 'Moxiecode Systems AB',
bgneal@45 42 authorurl : 'http://tinymce.moxiecode.com',
bgneal@45 43 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',
bgneal@45 44 version : tinymce.majorVersion + "." + tinymce.minorVersion
bgneal@45 45 };
bgneal@45 46 }
bgneal@45 47 });
bgneal@45 48
bgneal@45 49 // Register plugin
bgneal@45 50 tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell);
bgneal@45 51 })();