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/EnchantSpell.php | 66 ---------------------- 1 file changed, 66 deletions(-) delete mode 100755 program/js/tiny_mce/plugins/spellchecker/classes/EnchantSpell.php (limited to 'program/js/tiny_mce/plugins/spellchecker/classes/EnchantSpell.php') diff --git a/program/js/tiny_mce/plugins/spellchecker/classes/EnchantSpell.php b/program/js/tiny_mce/plugins/spellchecker/classes/EnchantSpell.php deleted file mode 100755 index fb6e67c43..000000000 --- a/program/js/tiny_mce/plugins/spellchecker/classes/EnchantSpell.php +++ /dev/null @@ -1,66 +0,0 @@ -= 1.4.1 - * @param Array $words Array of words to check. - * @return Array of misspelled words. - */ - function &checkWords($lang, $words) { - $r = enchant_broker_init(); - - if (enchant_broker_dict_exists($r,$lang)) { - $d = enchant_broker_request_dict($r, $lang); - - $returnData = array(); - foreach($words as $key => $value) { - $correct = enchant_dict_check($d, $value); - if(!$correct) { - $returnData[] = trim($value); - } - } - - return $returnData; - enchant_broker_free_dict($d); - } else { - - } - enchant_broker_free($r); - } - - /** - * Returns suggestions for a specific word. - * - * @param String $lang Selected language code (like en_US or de_DE). Shortcodes like "en" and "de" work with enchant >= 1.4.1 - * @param String $word Specific word to get suggestions for. - * @return Array of suggestions for the specified word. - */ - function &getSuggestions($lang, $word) { - $r = enchant_broker_init(); - $suggs = array(); - - if (enchant_broker_dict_exists($r,$lang)) { - $d = enchant_broker_request_dict($r, $lang); - $suggs = enchant_dict_suggest($d, $word); - - enchant_broker_free_dict($d); - } else { - - } - enchant_broker_free($r); - - return $suggs; - } -} - -?> -- cgit v1.2.3