MDL-25474 do not use html editor for css and js editing
authorPetr Skoda <skodak@moodle.org>
Thu, 2 Dec 2010 05:35:26 +0000 (05:35 +0000)
committerPetr Skoda <skodak@moodle.org>
Thu, 2 Dec 2010 05:35:26 +0000 (05:35 +0000)
mod/data/templates.php

index 7326301..ebfebde 100755 (executable)
@@ -158,6 +158,11 @@ if (empty($data->addtemplate) and empty($data->singletemplate) and
 
 editors_head_setup();
 $format = FORMAT_HTML;
 
 editors_head_setup();
 $format = FORMAT_HTML;
+
+if ($mode === 'csstemplate' or $mode === 'jstemplate') {
+    $disableeditor = true;
+}
+
 if ($disableeditor) {
     $format = FORMAT_PLAIN;
 }
 if ($disableeditor) {
     $format = FORMAT_PLAIN;
 }