views:

64

answers:

3

i don't sure why but tinymce delete all

<style>
...
</style>

info in the textarea

what can i do? 10x

A: 

<style> tags are not valid in the document's body.

It may be possible to protect them somehow (at least it is in its successor CKEDitor, see here and search for protectedSource), but the primary question should be: Why are they in there?

Pekka
+1  A: 

For the record CKEditor isn't a successor to TinyMCE, just a competitor.

You can keep the style tags in the content by specifying 'style' as one of the allowed tags in TinyMCE's validation config. Just add: extended_valid_elements: "style" to the config you pass to init.

Regards,

Adrian Sutton.
http://tinymce.ephox.com

ajsutton
A: 

i m facing the same problem. when i apply .newclasss{color:#c9c9c9;} in HTML editor of TinyMce, it removes tags when i click update. My valid elements are follows: extended_valid_elements : "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"

Also it is removing , and tags..

Can anyone help please??

jyoti