views:

135

answers:

1

is there any way to programatically remove all microsoft html formatting that gets put on and simply render it as regular html.

i want to remove all the extra tags as i am trying to load it into tinymce but tinymce doesn't seem to be able to render it.

+2  A: 

I've used the regular expressions from these articles:

In my case I wanted to restrict everyone down to a small whitelist of tags. Especially those who paste from Word. TinyMCE has a property "valid_elements" which does exactly this.

russau