]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-5585 Clicking on available tag does not enter it into html editor when defining...
authorskodak <skodak>
Sun, 10 Dec 2006 23:18:43 +0000 (23:18 +0000)
committerskodak <skodak>
Sun, 10 Dec 2006 23:18:43 +0000 (23:18 +0000)
mod/data/templates.php

index 29e29a3d942d4de8c8249c03211dc12927b8fa9a..83d5cc0954c8bf87ceb6c227a367731a2061b0bf 100755 (executable)
     
     // 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 .= '" ';