19 include_once($ROOT_PATH.
'wysiwyg_plugin.inc');
44 wysiwyg_plugin::wysiwyg_plugin($wysiwyg);
45 if (function_exists(
'pspell_suggest')) {
46 $this->
_add_button(
'spellchecker',
'spellchecker',
'Check Spelling',
'false',
'54');
69 function _add_button($id, $cmd, $tooltip, $textmode, $position, $context=
'')
73 @include_once(
'XML/XML_HTMLSax.php');
75 if (defined(
'XML_HTMLSAX')) {
76 parent::_add_button($id, $cmd, $tooltip, $textmode, $position, $context=
'');
78 trigger_localised_error(
'CORE0252', E_USER_WARNING,
'"Spell Checker"',
'Required PEAR Package "XML_HTMLSax" not installed');
95 <script type=
"text/javascript" language=
"Javascript">
97 HTMLArea.prototype._spellChecker =
function() {
101 if (HTMLArea.is_ie) {
102 this._docContent.focus();
103 }
else if (HTMLArea.ie_gecko) {
108 this._tmp[
'disable_toolbar'] =
true;
109 this.updateToolbar(
false);
111 editor_<?php echo $this->
wysiwyg->name?>._object =
this;
113 var popup_height = 410;
116 if (HTMLArea.is_safari) popup_height += 15;
118 this._popupDialog(
"spellChecker",
"<?php echo $this->get_popup_href('spell_checker_popup.php')?>?editor_name=<?php echo $this->wysiwyg->name?>", 605, popup_height,
false,
function(param) {
124 editor.setHTML(param[
"html"]);
144 this._spellChecker();
163 if (function_exists(
'pspell_suggest'))
return TRUE;
164 return translate(
'wysiwyg_pspell_not_installed');