相关疑难解决方法(0)

是否可以在商业网站上使用CKEditor?

我打算在商业网站上使用CKEditor.我已经阅读了http://ckeditor.com/license,但我不明白在提供LGPL(这是商业用途的不错选择)的同时可以为商业用途定价的方式.

licensing fckeditor lgpl

21
推荐指数
2
解决办法
1万
查看次数

如何在 CKEditor 中将 google-font 设置为默认字体?

我想在我的 CKEditor 中使用“Open Sans”作为默认字体,但不知道如何使用。
我正在使用 CKEditor 4.4.5 full

我已经在我的 html 头中包含了字体:

<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
Run Code Online (Sandbox Code Playgroud)


然后我尝试通过更改contents.css中的CSS来更改CKEditor的默认字体:

body
{
    /* Font */
    font-family: "Open Sans";
    font-size: 18px;
}
Run Code Online (Sandbox Code Playgroud)

但这似乎不起作用。

我还尝试在我的 Javascript 中设置它:

CKEDITOR.config.font_names = "Open Sans;";
CKEDITOR.config.font_defaultLabel = 'Open Sans';
Run Code Online (Sandbox Code Playgroud)

但这似乎只影响“字体”工具栏的显示,而不是样式本身。


注意:当我使用“ckeditor-gwf-plugin”时,我可以使用“Open Sans”,但这也无助于我将其设置为默认字体。

谢谢你的帮助 !

html css rich-text-editor ckeditor google-font-api

3
推荐指数
1
解决办法
2041
查看次数