开发者

with tinymce, how to convert an html tag into a different format

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.


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:Configuration/valid_elements

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜