简体   繁体   English

CKEditor无法正确应用跨度标签

[英]CKEditor not correctly apply span tags

I use CKEditor 4 and have this problem: 我使用CKEditor 4并遇到以下问题:

This occurs when the web page opened and editor field is empty. 当打开网页并且编辑器字段为空时,会发生这种情况。

We simply enter the text without any changes in style(font and etc), but default font and size does not applying. 我们只需输入文本即可,而无需更改样式(字体等),但是默认字体和大小不适用。 So result will be 所以结果将是

<html>some text</html>

instead of something like this 而不是像这样

<html><span style="font-family: courier; font-size: 10pt">some text</span></html>

If the ckeditor opened with some ready text in it everything is ok. 如果ckeditor打开并显示一些就绪文本,则一切正常。
How can we make that when ckeditor field is empty the default fonts will be applied automatically? 当ckeditor字段为空时,如何使默认字体自动应用?

innerhtml will remove the styles. innerhtml将删除样式。

Change like for ex. 像以前一样改变。 <div id="changehere" [innerHTML]="changehere"></div>

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

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