mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Updated use_html_editor() and print_editor_config()
This commit is contained in:
parent
6b9dbb377f
commit
5f9b13b860
1 changed files with 4 additions and 4 deletions
|
@ -3215,14 +3215,15 @@ function print_richedit_javascript($form, $name, $source='no') {
|
|||
*/
|
||||
function use_html_editor($name='', $editorhidebuttons='') {
|
||||
echo '<script language="javascript" type="text/javascript" defer="defer">'."\n";
|
||||
echo "editor = new HTMLArea('edit-$name');\n";
|
||||
echo "edit_$name = new HTMLArea('edit-$name');\n";
|
||||
echo "var config = edit_$name.config;\n";
|
||||
|
||||
echo print_editor_config($editorhidebuttons);
|
||||
|
||||
if (empty($name)) {
|
||||
echo "\n".'HTMLArea.replaceAll(editor.config);'."\n";
|
||||
} else {
|
||||
echo "\neditor.generate();\n";
|
||||
echo "\nedit_$name.generate();\n";
|
||||
}
|
||||
echo '</script>'."\n";
|
||||
}
|
||||
|
@ -3230,7 +3231,6 @@ function use_html_editor($name='', $editorhidebuttons='') {
|
|||
function print_editor_config($editorhidebuttons='', $return=false) {
|
||||
global $CFG;
|
||||
|
||||
$str = "var config = editor.config;\n";
|
||||
$str .= "config.pageStyle = \"body {";
|
||||
|
||||
if (!(empty($CFG->editorbackgroundcolor))) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue