开发者

markitup editor display output as html, and strip tags

im using this rte in bbcode format.

http://markitup.jaysalvat.com/home/

once the textarea is submitt开发者_高级运维ed i'm saving it with bbcode format.

but i need 2 things.

  • how do i now display it as html?
  • how can i display without the bbcode tags (i.e just text)


Convert in javascript,

Convert in c#,

Convert in PHP...

There are a lot of ways to convert BBCode. If you want to get rid of the BBCode, you'll have to use a regular expression removing all the [ ] blocks. Something like this'll do:

return preg_replace('|[[\/\!]*?[^\[\]]*?]|si','', $yourblockofbbcode);

(source)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜