1

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 http://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?

Thariama
  • 50,002
  • 13
  • 138
  • 166
Madhusudhan
  • 8,374
  • 12
  • 47
  • 68

1 Answers1

1

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);
},
Thariama
  • 50,002
  • 13
  • 138
  • 166