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 --- program/js/tiny_mce/plugins/spellchecker/rpc.php | 111 +++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100755 program/js/tiny_mce/plugins/spellchecker/rpc.php (limited to 'program/js/tiny_mce/plugins/spellchecker/rpc.php') diff --git a/program/js/tiny_mce/plugins/spellchecker/rpc.php b/program/js/tiny_mce/plugins/spellchecker/rpc.php new file mode 100755 index 000000000..a0072ae9c --- /dev/null +++ b/program/js/tiny_mce/plugins/spellchecker/rpc.php @@ -0,0 +1,111 @@ +decode($raw); + +// Execute RPC +if (isset($config['general.engine'])) { + $spellchecker = new $config['general.engine']($config); + $result = call_user_func_array(array($spellchecker, $input['method']), $input['params']); +} else + die('{"result":null,"id":null,"error":{"errstr":"You must choose an spellchecker engine in the config.php file.","errfile":"","errline":null,"errcontext":"","level":"FATAL"}}'); + +// Request and response id should always be the same +$output = array( + "id" => $input->id, + "result" => $result, + "error" => null +); + +// Return JSON encoded string +echo $json->encode($output); + +?> \ No newline at end of file -- cgit v1.2.3