1

当我将字体大小设置为所选文本时,CKEditor 创建新元素跨度并设置字体大小。

如果我将 font-size 设置为 H1 元素,它会在 H1 内创建新的 span 并将 font-size 设置为 span。

结果是假的行高。

<h1>
    <span style="font-size:10px;">Hello</span>
</h1>

//I want

<h1 style="font-size:10px;">
    <span style="font-size:10px;">Hello</span>
</h1>

除了跨度之外,如何将字体大小设置为父元素 h1、h2、p、ecc...?

谢谢!

4

1 回答 1

0

In CKEDITOR.config there is set_style and format_h1

Other option is to change the styles in contents.css

于 2015-12-11T12:34:11.797 回答