From f4f6291ec16bd2fe368f868e667ea2071c514098 Mon Sep 17 00:00:00 2001 From: alecpl Date: Thu, 24 Jun 2010 13:27:43 +0000 Subject: - Use built-in spellchecker instead of a PHP files of spellchecker plugin in TinyMCE --- .../plugins/spellchecker/classes/PSpell.php | 81 ---------------------- 1 file changed, 81 deletions(-) delete mode 100755 program/js/tiny_mce/plugins/spellchecker/classes/PSpell.php (limited to 'program/js/tiny_mce/plugins/spellchecker/classes/PSpell.php') diff --git a/program/js/tiny_mce/plugins/spellchecker/classes/PSpell.php b/program/js/tiny_mce/plugins/spellchecker/classes/PSpell.php deleted file mode 100755 index 6aa255cbd..000000000 --- a/program/js/tiny_mce/plugins/spellchecker/classes/PSpell.php +++ /dev/null @@ -1,81 +0,0 @@ -_getPLink($lang); - - $outWords = array(); - foreach ($words as $word) { - if (!pspell_check($plink, trim($word))) - $outWords[] = utf8_encode($word); - } - - return $outWords; - } - - /** - * Returns suggestions of for a specific word. - * - * @param {String} $lang Language code like sv or en. - * @param {String} $word Specific word to get suggestions for. - * @return {Array} Array of suggestions for the specified word. - */ - function &getSuggestions($lang, $word) { - $words = pspell_suggest($this->_getPLink($lang), $word); - - for ($i=0; $ithrowError("PSpell support not found in PHP installation."); - - // Setup PSpell link - $plink = pspell_new( - $lang, - $this->_config['PSpell.spelling'], - $this->_config['PSpell.jargon'], - $this->_config['PSpell.encoding'], - $this->_config['PSpell.mode'] - ); - - // Setup PSpell link -/* if (!$plink) { - $pspellConfig = pspell_config_create( - $lang, - $this->_config['PSpell.spelling'], - $this->_config['PSpell.jargon'], - $this->_config['PSpell.encoding'] - ); - - $plink = pspell_new_config($pspell_config); - }*/ - - if (!$plink) - $this->throwError("No PSpell link found opened."); - - return $plink; - } -} - -?> -- cgit v1.2.3