CKEditor 不显示特殊字符

发布于 2024-10-08 03:02:14 字数 447 浏览 0 评论 0原文

我目前在网页上设置了 CKeditor,但是当我尝试使用特殊 HTML 字符(例如 <)时,会发生奇怪的事情。显然,我希望整个内容都显示出来

。页面源代码,我有以下内容

<textarea class="ckeditor" name="credit"><p>
    “The Carlu.” Web. 15 Oct. 2010. &lt;http://www.thecarlu.com/thecarlu.html&gt;.</p>
</textarea> 

但是,一旦加载 CKEditor,我就会在可编辑部分看到以下内容

“卡鲁。”网络。 2010 年 10 月 15 日。.

这是怎么回事?应该如何解决?

I presently have CKeditor setup on a webpage, but strange things are happening when I attempt to use special HTML characters (such as < for example. Obviously, I want the whole thing to show up.

In the page source, I have the following

<textarea class="ckeditor" name="credit"><p>
    “The Carlu.” Web. 15 Oct. 2010. <http://www.thecarlu.com/thecarlu.html>.</p>
</textarea> 

However, once CKEditor has loaded, I see the following in the editable section

“The Carlu.” Web. 15 Oct. 2010. .

Whats going on here and how should this be resolved?

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

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

发布评论

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

评论(1

九厘米的零° 2024-10-15 03:02:14

是否没有一个选项可以将 CKEditor 内容视为实体编码或类似的内容?

我建议你尝试使用这个参数

CKEDITOR.config.htmlEncodeOutput
CKEDITOR.config.entities 

Isn't there an option to treat CKEditor content as entity-encoded or something similar?

I suggest you try to play around with this parameters

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