From: skodak Date: Sun, 10 Dec 2006 23:18:43 +0000 (+0000) Subject: MDL-5585 Clicking on available tag does not enter it into html editor when defining... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=986b73b818e278ca8b54c9249290ee813e0e692d;p=moodle.git MDL-5585 Clicking on available tag does not enter it into html editor when defining database templates --- diff --git a/mod/data/templates.php b/mod/data/templates.php index 29e29a3d94..83d5cc0954 100755 --- a/mod/data/templates.php +++ b/mod/data/templates.php @@ -73,8 +73,11 @@ // For the javascript for inserting template tags: initialise the default textarea to // 'edit_template' - it is always present in all different possible views. + + $editorobj = 'editor_'.md5('template'); + $bodytag = 'onload="'; - $bodytag .= 'if (typeof(edit_template) != \'undefined\') { currEditor = edit_template; } '; + $bodytag .= 'if (typeof('.$editorobj.') != \'undefined\') { currEditor = '.$editorobj.'; } '; $bodytag .= 'currTextarea = document.tempform.template;'; $bodytag .= '" ';