Mercurial > public > sg101
annotate media/js/tiny_mce/plugins/iespell/editor_plugin_src.js @ 183:149c3567fec1
Updated to TinyMCE version 3.3.2. This is for #57.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sun, 28 Mar 2010 21:47:48 +0000 |
parents | a5b4c5ce0658 |
children |
rev | line source |
---|---|
bgneal@45 | 1 /** |
bgneal@183 | 2 * editor_plugin_src.js |
bgneal@45 | 3 * |
bgneal@183 | 4 * Copyright 2009, Moxiecode Systems AB |
bgneal@183 | 5 * Released under LGPL License. |
bgneal@183 | 6 * |
bgneal@183 | 7 * License: http://tinymce.moxiecode.com/license |
bgneal@183 | 8 * Contributing: http://tinymce.moxiecode.com/contributing |
bgneal@45 | 9 */ |
bgneal@45 | 10 |
bgneal@45 | 11 (function() { |
bgneal@45 | 12 tinymce.create('tinymce.plugins.IESpell', { |
bgneal@45 | 13 init : function(ed, url) { |
bgneal@45 | 14 var t = this, sp; |
bgneal@45 | 15 |
bgneal@45 | 16 if (!tinymce.isIE) |
bgneal@45 | 17 return; |
bgneal@45 | 18 |
bgneal@45 | 19 t.editor = ed; |
bgneal@45 | 20 |
bgneal@45 | 21 // Register commands |
bgneal@45 | 22 ed.addCommand('mceIESpell', function() { |
bgneal@45 | 23 try { |
bgneal@45 | 24 sp = new ActiveXObject("ieSpell.ieSpellExtension"); |
bgneal@45 | 25 sp.CheckDocumentNode(ed.getDoc().documentElement); |
bgneal@45 | 26 } catch (e) { |
bgneal@45 | 27 if (e.number == -2146827859) { |
bgneal@45 | 28 ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) { |
bgneal@45 | 29 if (s) |
bgneal@45 | 30 window.open('http://www.iespell.com/download.php', 'ieSpellDownload', ''); |
bgneal@45 | 31 }); |
bgneal@45 | 32 } else |
bgneal@45 | 33 ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number); |
bgneal@45 | 34 } |
bgneal@45 | 35 }); |
bgneal@45 | 36 |
bgneal@45 | 37 // Register buttons |
bgneal@45 | 38 ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'}); |
bgneal@45 | 39 }, |
bgneal@45 | 40 |
bgneal@45 | 41 getInfo : function() { |
bgneal@45 | 42 return { |
bgneal@45 | 43 longname : 'IESpell (IE Only)', |
bgneal@45 | 44 author : 'Moxiecode Systems AB', |
bgneal@45 | 45 authorurl : 'http://tinymce.moxiecode.com', |
bgneal@45 | 46 infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell', |
bgneal@45 | 47 version : tinymce.majorVersion + "." + tinymce.minorVersion |
bgneal@45 | 48 }; |
bgneal@45 | 49 } |
bgneal@45 | 50 }); |
bgneal@45 | 51 |
bgneal@45 | 52 // Register plugin |
bgneal@45 | 53 tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell); |
bgneal@45 | 54 })(); |