From 4ca10b8d511d85a4d575af355b0a6739d5a05958 Mon Sep 17 00:00:00 2001 From: thomascube Date: Fri, 15 Aug 2008 21:47:31 +0000 Subject: Enable spellchecker for HTML editor --- .../plugins/spellchecker/classes/SpellChecker.php | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 program/js/tiny_mce/plugins/spellchecker/classes/SpellChecker.php (limited to 'program/js/tiny_mce/plugins/spellchecker/classes/SpellChecker.php') diff --git a/program/js/tiny_mce/plugins/spellchecker/classes/SpellChecker.php b/program/js/tiny_mce/plugins/spellchecker/classes/SpellChecker.php new file mode 100755 index 000000000..d6800391a --- /dev/null +++ b/program/js/tiny_mce/plugins/spellchecker/classes/SpellChecker.php @@ -0,0 +1,61 @@ +_config = $config; + } + + /** + * Simple loopback function everything that gets in will be send back. + * + * @param $args.. Arguments. + * @return {Array} Array of all input arguments. + */ + function &loopback(/* args.. */) { + return func_get_args(); + } + + /** + * Spellchecks an array of words. + * + * @param {String} $lang Language code like sv or en. + * @param {Array} $words Array of words to spellcheck. + * @return {Array} Array of misspelled words. + */ + function &checkWords($lang, $words) { + return $words; + } + + /** + * 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) { + return array(); + } + + /** + * Throws an error message back to the user. This will stop all execution. + * + * @param {String} $str Message to send back to user. + */ + function throwError($str) { + die('{"result":null,"id":null,"error":{"errstr":"' . addslashes($str) . '","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}'); + } +} + +?> -- cgit v1.2.3