From 986b73b818e278ca8b54c9249290ee813e0e692d Mon Sep 17 00:00:00 2001 From: skodak Date: Sun, 10 Dec 2006 23:18:43 +0000 Subject: [PATCH] MDL-5585 Clicking on available tag does not enter it into html editor when defining database templates --- mod/data/templates.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 .= '" '; -- 2.39.5