tags:

views:

62

answers:

2

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?

A: 

Is this if people were to paste in text formatted from Word or similar?

Roger Walsh
ah yes... or pasting content from any other source..
Madhusudhan
Not too sure... perhaps try and look at the paste from word plugin and see if you can use automatically run it on paste rather than having to click the toolbar button?
Roger Walsh
A: 

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