CKEditor 和字体颜色已保存但不起作用

发布于 2024-08-22 19:10:51 字数 832 浏览 5 评论 0原文

我刚刚安装了 CKEditor 并使用 JS 标签调用它。 当我保存文本时,所有字体属性(缩进、空格、大小、装饰等)都被正确保存。

问题是,当我想使用 CKEditor 编辑数据时,所有这些属性都已正确加载,但颜色即使在下面的示例中设置为“蓝色”!

这很奇怪,因为当我可以在数据库中看到颜色样式属性时:

<h3 style=\"\\&quot;color:blue\\&quot;\">
<strong>aulne </strong>kjhqsdf <span style=\"\\&quot;color:#008000;\\&quot;\"><u>kjhkjsdfh </u></span>j&#39;<span style=\"\\&quot;\\\\&quot;\\\\&quot;\\&quot;\"><em>esp&egrave;re </em></span><span style=\"\\&quot;\\\\&quot;\\\\&quot;\\&quot;\">bien<sup>2</sup></span></h3>

我发现了这个旧的错误帖子 http ://dev.fckeditor.net/ticket/116 没有找到解决方案的地方。

非常感谢, 问候。

I've just installed CKEditor and call it with JS tag.
When I save the text, all the font attributes (indentation, space, size, decoration,etc.) are correctly saved .

The problem is that when I want to edit the data, with CKEditor, all these attributes are well loaded but the COLOR even if, in the example below, it's set to "BLUE"!

Which is very bizarre because when I can see the color style property in my database:

<h3 style=\"\\"color:blue\\"\">
<strong>aulne </strong>kjhqsdf <span style=\"\\"color:#008000;\\"\"><u>kjhkjsdfh </u></span>j'<span style=\"\\"\\\\"\\\\"\\"\"><em>espère </em></span><span style=\"\\"\\\\"\\\\"\\"\">bien<sup>2</sup></span></h3>

I found this old bug post http://dev.fckeditor.net/ticket/116
where no solution is found.

Thank very much,
regards.

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

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

发布评论

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

评论(2

我为君王 2024-08-29 19:10:51

我发现了问题:
在 php 方面,在插入之前,我使用了我忘记删除的“addslash”函数。

再次感谢。

I found the problem:
on the php side, before inserting, I was using the "addslash" function I forgot to remove.

Thanks again.

触ぅ动初心 2024-08-29 19:10:51

当我注释掉 php 代码中的斜杠时,它停止工作。所以我做了相反的事情,没有去掉斜线。当我读到另一个答案时,我想,昨天我评论了以下内容。现在工作正常了!某些 PHP 模式(例如安全模式)将生成额外的斜杠以减少黑客尝试,因此从具有不同模式的服务器移动代码可能会导致问题。所以这个答案是相同但相反的原因。我的服务器处于安全模式,因此它会自动添加斜杠,我必须删除它们。

$a10 = 条斜杠($a10);

It stopped working when I commented out the stripslashes from the php code. So I was doing the opposite and not stripping the slashes. Once I read the other answer I thought dah, I commented the following out yesterday. Now works fine! Certain PHP modes like safe mode will generate extra slashes to lessen hack attempts so moving code from servers with different modes can cause issues. So this answer is the same but opposite reason. My server is in safe mode so it automatically adds the slashes and I must remove them.

$a10 = stripslashes($a10);

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