tinymce : Remove css styles from style attribute
I am trying to configure tinymce to not allow css styles in style attribute.
I just want to allow one style which is text-decoration. Here is a similar problem ht开发者_JAVA技巧tp://tinymce.moxiecode.com/punbb/viewtopic.php?pid=76101 .
The valid_styles option is not present and I dont want to use regexp on my content, coz there got to be some or the other option with tinymce. I searched through the tinymce forums but couldn't find any proper solution.
Can anybody help?
What you need to do is tu use the paste plugin and do some prefiltering when performing copy+paste into the editor.
Use the paste_preprocess setting in your init, using your own cleanup mechanism here:
paste_preprocess : function(pl, o) {
o.content = custom_function_modify(o.content);
},
精彩评论