Tinymce - 使用 bbcodes 的字体大小问题
我正在使用 tinymce 和 bbcodes-plugin。一般来说,它工作得很好,大多数 bbcodes 如 [b] 和 [color] 等都被传输到文本区域内的 html 中,并作为 bbcodes 正确保存到数据库中。
font-size 的情况如下,当第一次格式化字符串时,它会正确更改其大小并作为 bbcode 正确保存到数据库中。 但是当我再次打开该记录进行编辑时,bbcode 不会转换为 html,因此在文本区域中存在类似
“[size=medium]rfeferf[/size]”的内容,而不是正确大小的文本。
您对此有什么提示吗?我昨天和今天一直在网上搜索,没有找到任何可以解决这个问题的东西。
问候, 马斯切克
i am using tinymce with the bbcodes-plugin. In generally, its working nicely, most of the bbcodes like [b] and [color] and so forth are transmitted into html within the textarea and safed as bbcodes into the database correctly.
The thing with font-size is the following, when formating a string the first time it is correctly changing its size and is safed correctly as bbcode into the database.
But when i open that record again to edit it, the bbcode is not converted to html, so in the textarea there is something like
"[size= medium]rfeferf[/size]" instead of the text in the right size.
Do you have any hints on this? Ive been searching the web yesterday and today, didnt find anything that could solve this.
Regards, Maschek
这是由于 TinyMCE 中的 BBCode 插件无法将 [size] 标签转换回 HTML 造成的。我已经记录了带有修复补丁的 TinyMCE bug #5327。您可以下载最新的 TinyMCE 源代码,应用补丁并编译它(或等待补丁审核并发布)。
相关源码位于plugins/bbcode/editor_plugin_src.js
This is caused by BBCode plugin in TinyMCE unable to transform [size] tag back to HTML. I've logged a TinyMCE bug #5327 with a fix patch attached. You can download latest TinyMCE source, apply the patch and compile it (or wait until the patch is reviewed and released).
The related source code is located at plugins/bbcode/editor_plugin_src.js