【发布时间】:2014-09-12 16:34:32
【问题描述】:
我正在尝试使用 tinymce 4.1.5 正确格式化 bbcode 标记的顺序。
当我设置文本颜色并为其添加下划线时,结束标签会混淆或将 text-decoration="underline" 属性放在颜色标签中。
例如,我得到了
[color="ff0000" text-decoration="underline"]some text[/color]
应该是什么时候
[color="ff0000"][u]some text[/u][/color]
或者我可能会得到 [color="ff0000"][u]一些文字[/color][u]
这是我的文本区域
@using (Html.BeginForm("TestTinyMce", "Content", FormMethod.Post))
{
@Html.TextArea("TextArea", Model.TextArea, new { @id = "TextArea", @class = "tinymce" })
<input type="submit" value="submit"/>
}
这里是初始化:
tinymce.init({
selector: "textarea",
theme: "modern",
plugins: [
"bbcode,paste,textcolor"
],
toolbar1: "undo redo | bold italic underline forecolor | link unlink "
});
当它提交后到达控制器时,我正在检查该值。我正在尝试查看是否有任何配置、插件或技巧可以用来清理此 bbcode。
【问题讨论】:
标签: javascript asp.net-mvc tinymce bbcode tinymce-4