如何在CKEditor 4中设置默认字体和字体大小 [英] How to set default font and font size in CKEditor 4
本文介绍了如何在CKEditor 4中设置默认字体和字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用以下代码在CKEditor 4中设置默认字体和字体大小:
I have use the following code to set default font and font size in CKEditor 4:
config.font_defaultLabel = 'Tahoma';
config.fontSize_defaultLabel = '24px';
但是以上代码在Mozilla Firefox上不起作用。
But above code is not working on Mozilla Firefox.
推荐答案
我使用下面的命令更改了字体大小和字体系列,
I changed the font-size and font-family using below,
CKEDITOR.addCss(".cke_editable{cursor:text; font-size: 14px; font-family: Arial, sans-serif;}");
这篇关于如何在CKEditor 4中设置默认字体和字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文