1 // Spell Checker Plugin for HTMLArea-3.0
2 // Implementation by Mihai Bazon. Sponsored by www.americanbible.org
4 // htmlArea v3.0 - Copyright (c) 2002 interactivetools.com, inc.
5 // This notice MUST stay intact for use (see license.txt).
7 // A free WYSIWYG editor replacement for <textarea> fields.
8 // For full source code and docs, visit http://www.interactivetools.com/
10 // Version 3.0 developed by Mihai Bazon for InteractiveTools.
11 // http://students.infoiasi.ro/~mishoo
15 function SpellChecker(editor) {
18 var cfg = editor.config;
19 var tt = SpellChecker.I18N;
20 var bl = SpellChecker.btnList;
23 // register the toolbar buttons provided by this plugin
28 toolbar.push("separator");
30 var id = "SC-" + btn[0];
31 cfg.registerButton(id, tt[id], "plugins/SpellChecker/img/" + btn[0] + ".gif", false,
32 function(editor, id) {
33 // dispatch button press event
34 self.buttonPress(editor, id);
40 for (var i in toolbar) {
41 cfg.toolbar[0].push(toolbar[i]);
45 SpellChecker.btnList = [
50 SpellChecker.prototype.buttonPress = function(editor, id) {
52 case "SC-spell-check":
53 SpellChecker.editor = editor;
54 SpellChecker.init = true;
55 var uiurl = editor.config.editorURL + "plugins/SpellChecker/spell-check-ui.html";
58 win = window.open(uiurl, "SC_spell_checker",
59 "toolbar=no,location=no,directories=no,status=no,menubar=no," +
60 "scrollbars=no,resizable=yes,width=600,height=400");
62 win = window.open(uiurl, "SC_spell_checker",
63 "toolbar=no,menubar=no,personalbar=no,width=600,height=400," +
64 "scrollbars=no,resizable=yes");
71 // this needs to be global, it's accessed from spell-check-ui.html
72 SpellChecker.editor = null;