简体   繁体   English

阻止CKEditor制作内联样式?

[英]Stop CKEditor From Making Inline Styles?

I have tried finding a solution on the CK Editor website, but there don't seem to be any answers. 我尝试在CK编辑器网站上找到解决方案,但似乎没有任何答案。

When formatting content within the editor, an image, for example, it applies the attributes (eg. width, height) as an inline style. 例如,当在编辑器中格式化内容时,图像会以内联样式应用属性(例如,宽度,高度)。 Eg: style="width: 320px; height: 136px;" 例如: style="width: 320px; height: 136px;" instead of width="320" height="136" 而不是width="320" height="136"

This makes it impossible to change via a stylesheet. 这使得无法通过样式表进行更改。 Obviously using a plain textarea instead is not a solution for me, because rich text formatting is essential. 显然,使用纯文本区域,而不是不是我一个解决方案,因为丰富的文本格式是必不可少的。

I'm using CKEDitor version 4.1.1. 我正在使用CKEDitor版本4.1.1。 Anyone know how to change the configuration so that inline styles do not occur? 有谁知道如何更改配置,以免发生内联样式?

Thanks! 谢谢!

在您下载的样本中,有一个名为“输出HTML”的代码,查看其代码,您将看到如何在图像中使用属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM