如何在ckeditor中对一个元素应用多种样式?
How to apply multiple styles to one element in ckeditor?
我想将一些 bootstrap 类 整合到我的 ckeditor 配置文件中:
{ name : 'Button Large' , element : 'a', attributes : { 'class' : 'btn-lg' } },
{ name : 'Button Primary' , element : 'a', attributes : { 'class' : 'btn-primary' } },
但问题是这些样式无法组合。如果我想要一个 btn-primary
和 btn-lg
的按钮,我将不得不创建第三种样式:
{ name : 'Button Large Primary' , element : 'a', attributes : { 'class' : 'btn-lg btn-primary' } },
这对于许多按钮来说显然是多余的,没有必要。那你怎么能做到这一点?
使用 CKeditor 4.4.3
我想将一些 bootstrap 类 整合到我的 ckeditor 配置文件中:
{ name : 'Button Large' , element : 'a', attributes : { 'class' : 'btn-lg' } },
{ name : 'Button Primary' , element : 'a', attributes : { 'class' : 'btn-primary' } },
但问题是这些样式无法组合。如果我想要一个 btn-primary
和 btn-lg
的按钮,我将不得不创建第三种样式:
{ name : 'Button Large Primary' , element : 'a', attributes : { 'class' : 'btn-lg btn-primary' } },
这对于许多按钮来说显然是多余的,没有必要。那你怎么能做到这一点?
使用 CKeditor 4.4.3