CKEditor 无法解析样式设置
当我在CKEditor(CKEditor 3.5.2)中保存文档时,保存的HTML是正确的。但是当我再次打开该 HTML 进行编辑(将 HTML 放入文本区域然后加载 CKEditor)时,CKEditor 解析样式设置错误。
如果我有一个如下所示的代码:
<div style="font-family: arial; font-size: 11px; background: green;">Hello</div>
然后用 CKEditor 打开它,它看起来像这样
<div style="font-family: arial font-size: 11px background: green">Hello</div>
:已经消失了。无论我使用哪种样式设置,分号在所有情况下都会消失。
样式设置在什么元素中并不重要,同样的问题出现在img、div、a、span...等等。
我该怎么办?我大约 100% 确定问题出在 ckeditor 上。我直接从数据库打开 HTML。但除了 ckeditor 之外还能是什么?
我不使用任何 CMS 网站,只使用纯 php。
When I save a document in CKEditor (CKEditor 3.5.2), the saved HTML is right. But when I open that HTML again for editing (putting the HTML in a textarea and then load CKEditor), CKEditor parses the style setting wrong.
If I have a code that looks like this:
<div style="font-family: arial; font-size: 11px; background: green;">Hello</div>
And then open it with CKEditor, it looks like this:
<div style="font-family: arial font-size: 11px background: green">Hello</div>
The ; has disappeared. It does not matter which style settings I use, the semicolon disappears in all cases.
It does not matter what element the style setting is in. The same problem appears in img, div, a, span... and so on.
What shall I do? I am about 100% sure it is ckeditor that is the problem. I open the HTML right from the database. But what else than ckeditor could it be?
I do not use any CMS site, just pure php.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能是一些配置问题。
正确重新安装,因为我也在使用 ckeditor,它在所有浏览器中都能正常工作,并支持所有类型的 html 或 css 标签
might be some configuration issues.
reinstall properly because i am also using ckeditor it's works fine in all browser and support all kind of html or css tags