From 40b059beb5bd73ccfa476409f8bff30975dbc413 Mon Sep 17 00:00:00 2001 From: thomasb Date: Fri, 15 Aug 2008 21:47:31 +0000 Subject: Enable spellchecker for HTML editor git-svn-id: https://svn.roundcube.net/trunk@1651 208e9e7b-5314-0410-a742-e7e81cd9613c --- .../js/tiny_mce/plugins/spellchecker/rpc.php | 111 +++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100755 roundcubemail/program/js/tiny_mce/plugins/spellchecker/rpc.php (limited to 'roundcubemail/program/js/tiny_mce/plugins/spellchecker/rpc.php') diff --git a/roundcubemail/program/js/tiny_mce/plugins/spellchecker/rpc.php b/roundcubemail/program/js/tiny_mce/plugins/spellchecker/rpc.php new file mode 100755 index 000000000..a0072ae9c --- /dev/null +++ b/roundcubemail/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