MDL-33712 add support for unique moodle tags in tinymce
authorPetr Skoda <commits@skodak.org>
Fri, 15 Jun 2012 08:37:12 +0000 (10:37 +0200)
committerDan Poltawski <dan@moodle.com>
Tue, 10 Jul 2012 07:56:11 +0000 (15:56 +0800)
lib/editor/tinymce/lib.php

index 01537e9..10753a9 100644 (file)
@@ -178,6 +178,9 @@ class tinymce_texteditor extends texteditor {
             $params['valid_elements'] = 'script[src|type],*[*]'; // for some reason the *[*] does not inlcude javascript src attribute MDL-25836
             $params['invalid_elements'] = '';
         }
+        // Add unique moodle elements - unfortunately we have to decide if these are SPANs or DIVs.
+        $params['extended_valid_elements'] = 'nolink,tex,algebra,lang[lang]';
+        $params['custom_elements'] = 'nolink,~tex,~algebra,lang';
 
         if (empty($options['legacy'])) {
             if (isset($options['maxfiles']) and $options['maxfiles'] != 0) {