tags:

views:

79

answers:

1

I want to convert an HTML tag that tinymce returns into a different format.

e.g. The italics tag I want to convert to #i#

Is that possible with the editor itself? During postback I strip all html tags, so I need it in a different safer format.

A: 

Add an onsubmit call to your form and use a simple javascript function to string replace the html tags you want to keep.

A more constructive method that might achieve what you want is to use the built in 'Valid elements' feature of tinymce. You can specify exactly which HTML tags you want to keep and it will strip out anything else. Plus it might be able to save you the step of stripping out the HTML yourself.

e.g. valid_elements : "i,b,u",

http://wiki.moxiecode.com/index.php/TinyMCE%3AConfiguration/valid%5Felements

james