Setting aside the concerns surrounding allowing <script>
content within a Web editor, I am fully aware of them.
What I am interested in is permitting <style>
and <script>
elements within the text content. However, every time I attempt to do so in TinyMCE, it automatically changes them to:
<style><!-- th{width:80px} --></style>
and for script content, it alters it to:
<script>// <![CDATA[
$.address.unbind();
// ]]></script>
In my TinyMCE initialization configuration, I have the following settings:
valid_elements : "*[*]",
extended_valid_elements : "*[*],script[charset|defer|language|src|type],style",
custom_elements: "*[*],script[charset|defer|language|src|type],style",
valid_children : "+body[style],+body[script]",
verify_html : false,
media_strict: false
Despite these settings, I am struggling to find a solution that prevents TinyMCE from deactivating the <style>
and <script>
elements.