CKEditor 禁用 HTML 转换

发布于 2024-08-31 09:13:06 字数 161 浏览 2 评论 0原文

我的 CKEditor 有问题。特别是 br- 和 img-标签被转换为无效。 在源视图中,我看到
,但是当我检查 rte 源时,斜杠消失了,提交表单时也是如此。 有人可以告诉我在哪里可以禁用此功能或启用 XHTML 一致性吗?嵌入页面是XHTML。

感谢任何提示、想法或解决方案。

I've got a problem with CKEditor. Especially the br- and img-Tags are transformed to not be valid.
In the source-view I see
and but when I inspect the rte-source the slashes are gone as well as when submitting the form.
Can someone tell me where I can disable this or enable XHTML-conformity? The embedding page is XHTML.

Thank to any hints, ideas or solutions.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

臻嫒无言 2024-09-07 09:13:06

要解决这个问题,请如上所述:

这不是 CKEditor 的问题。我确实使用了 jQuery 的 html 方法,该方法依赖于 DOM insideHTML 属性来获取 CKEditors 内容。这个属性似乎根本无法处理XHTML(在FF和Chrome中测试)。
您需要手动替换所有斜杠。

To solve this problem describe above:

This wasn't a problem of CKEditor. I did use jQuery's html-method that relies on the DOM innerHTML property to get CKEditors contents. This property seems to be unable to handle XHTML at all (tested in FF and Chrome).
You need to replace all slashes manually.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文