PageRenderTime 22ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/BlogEngine/BlogEngine.NET/editors/tiny_mce_3_4_3_1/plugins/iespell/editor_plugin_src.js

#
JavaScript | 54 lines | 35 code | 7 blank | 12 comment | 4 complexity | 311e13bcc85c06da43decc37dc1b4f83 MD5 | raw file
Possible License(s): LGPL-2.1, Apache-2.0, BSD-3-Clause
  1. /**
  2. * editor_plugin_src.js
  3. *
  4. * Copyright 2009, Moxiecode Systems AB
  5. * Released under LGPL License.
  6. *
  7. * License: http://tinymce.moxiecode.com/license
  8. * Contributing: http://tinymce.moxiecode.com/contributing
  9. */
  10. (function() {
  11. tinymce.create('tinymce.plugins.IESpell', {
  12. init : function(ed, url) {
  13. var t = this, sp;
  14. if (!tinymce.isIE)
  15. return;
  16. t.editor = ed;
  17. // Register commands
  18. ed.addCommand('mceIESpell', function() {
  19. try {
  20. sp = new ActiveXObject("ieSpell.ieSpellExtension");
  21. sp.CheckDocumentNode(ed.getDoc().documentElement);
  22. } catch (e) {
  23. if (e.number == -2146827859) {
  24. ed.windowManager.confirm(ed.getLang("iespell.download"), function(s) {
  25. if (s)
  26. window.open('http://www.iespell.com/download.php', 'ieSpellDownload', '');
  27. });
  28. } else
  29. ed.windowManager.alert("Error Loading ieSpell: Exception " + e.number);
  30. }
  31. });
  32. // Register buttons
  33. ed.addButton('iespell', {title : 'iespell.iespell_desc', cmd : 'mceIESpell'});
  34. },
  35. getInfo : function() {
  36. return {
  37. longname : 'IESpell (IE Only)',
  38. author : 'Moxiecode Systems AB',
  39. authorurl : 'http://tinymce.moxiecode.com',
  40. infourl : 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/iespell',
  41. version : tinymce.majorVersion + "." + tinymce.minorVersion
  42. };
  43. }
  44. });
  45. // Register plugin
  46. tinymce.PluginManager.add('iespell', tinymce.plugins.IESpell);
  47. })();