Tiny MCE: Allow Javascript In a Tiny MCE Editor

2/16/2015 10:59:15 PM

To allow a Tiny MCE editor to accept javascript, you must add the extended_valid_elements attribute to allow the scripts tags. If not, Tiny MCE will automatically remove these tags to prevent script injection.

tinymce.init({
       .....
        extended_valid_elements : "script[language|type|src]"
    });