markitup editor将输出显示为html和strip标签

时间:2011-03-24 11:57:32

标签: c# javascript jquery bbcode markitup

我以bbcode格式使用此rte。

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

提交textarea后,我用bbcode格式保存它。

但我需要两件事。

  • 我现在如何将其显示为html?
  • 如何在没有bbcode标签的情况下显示(即只是文字)

1 个答案:

答案 0 :(得分:0)

Convert in javascript

Convert in c#

Convert in PHP ...

有很多方法可以转换BBCode。如果你想摆脱BBCode,你将不得不使用正则表达式删除所有[]块。像这样的事情:

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

source