MDL-15942 - separate data escaped for database entry from unescaped data
[moodle-linuxchix.git] / lib / speller / lib.php
blob9a655f8646d03260ecf9eb2de1d0ab071eac5e4e
1 <?php // $Id$
3 function speller_enable (&$CFG) {
4 echo "function spellClickHandler(editor, buttonId) {\n";
5 echo "\teditor._textArea.value = editor.getHTML();\n";
6 echo "\tvar speller = new spellChecker( editor._textArea );\n";
7 echo "\tspeller.popUpUrl = \"" . $CFG->httpswwwroot ."/lib/speller/spellchecker.html\";\n";
8 echo "\tspeller.spellCheckScript = \"". $CFG->httpswwwroot ."/lib/speller/server-scripts/spellchecker.php?id=$courseid\";\n";
9 echo "\tspeller._moogle_edit=1;\n";
10 echo "\tspeller._editor=editor;\n";
11 echo "\tspeller.openChecker();\n";
12 echo "}\n";
13 echo "config.registerButton(\"spell-check\", \"spell-check\", \"". $CFG->wwwroot ."/lib/speller/spell.gif\", false, spellClickHandler);\n";
14 echo "config.toolbar.push([\"spell-check\"]);\n";