TinyMCE 浏览器“修复”
当我使用 TinyMCE 时,我在 Firefox 和 Opera 中遇到 javascript 错误:
j is null
(function(d){var a=/^\s*|\s*$/g,e,c="B...a.selection.onSetContent.add(f)})}});
在我第二次、第三次等保存文本区域的内容后,会出现此错误。第一次保存时......
因为它工作正常在其他浏览器(IE 和 Chrome)中,我认为问题出在 Opera 和可能 Firefox 也在运行的“TinyMCE”修复程序中...
有什么方法可以阻止这些浏览器应用这些修复程序吗?无论如何,浏览器尝试修复第三方脚本对我来说似乎很荒谬
I'm getting a javascript error in Firefox and Opera when I'm using TinyMCE:
j is null
(function(d){var a=/^\s*|\s*$/g,e,c="B...a.selection.onSetContent.add(f)})}});
This error comes up after I save the contents of the textarea for the 2nd time, 3rd etc. First time it gets saved...
Since it's working fine in the other browsers (IE and Chrome), I assume the issue is within the "TinyMCE" fixes which Opera and probably Firefox too are running...
Is there any way I can stop these browsers from applying these fixes? Anyway it seems ridiculous to me for a browser to attempt to fix a 3rd party script
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个tinymce错误。在内部,tinymce 代码使用
来记住粘贴时的插入符号位置。当验证生成的片段时,粘贴后,跨度被视为无效并被删除,从而通过删除标记来破坏代码。
此问题将在下一个官方 tinymce 小版本中修复。对于此类问题有一些解决方法。一是在
spans
中添加id
和mce-data-type
属性作为有效元素(初始化设置)。例子:it's a tinymce bug. Internally, the tinymce code uses a
<span id="mce_marker"></span>
to remember the caret-position when pasting. when validating the resulting fragment, after the paste, the span is deemed invalid and removed, thus breaking the code by removing the marker.This issue will be fixed in the next official tinymce minor release. There are some workarounds for this kind of issue. One is to add
id
andmce-data-type
attribute tospans
as valid elements (init setting). Example: