开发者

CK editor- multiple styles to elements

开发者 https://www.devze.com 2023-03-23 11:38 出处:网络
I wonder if any of you are CK editor experts? The way that CK edi开发者_JAVA百科tor is set up, when I add multiple styles to a selection of text, it will wrap the text in span tags with style attribut

I wonder if any of you are CK editor experts? The way that CK edi开发者_JAVA百科tor is set up, when I add multiple styles to a selection of text, it will wrap the text in span tags with style attributes- but it will use a new tag for each style- which often results in the styles being lost.

For example, if I wanted to apply the following styles to a selection of text- bold, font-size:22px and color:red - CK editor would output the following HTML:

<span style="color: rgb(255, 0, 0);"><span style="font-size: 22px;"><strong>Testing</strong></span></span>

Which doesn't apply the styles properly. Does anyone know how to set it up to output like:

<span style="color:rgb(255,0,0);font-size: 22px;font-weight:bold">Testing</span>

Thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消