TinyMCE is removing <style> tags

Since style tags are not valid XHTML, TinyMCE disabled the ability to add them outside of the tags.

You have to add style tags to the valid children configuration

valid_children : "+body[style]"

Edit: This solution applies to version 3.4.2

Source


"hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style],img[href|src|name|title|onclick|align|alt|title|width|height|vspace|hspace],iframe[id|class|width|size|noshade|src|height|frameborder|border|marginwidth|marginheight|target|scrolling|allowtransparency],style[type]"

Let me know how that works for you


If you put tinyMCE in fullpage mode, you can put styles in the <head>

<script type="text/javascript">
tinyMCE.init({
        plugins : "fullpage",
});
</script>