2014-10-03 39 views

回答

0

我可以添加字体到tinymce的唯一方法是编辑核心代码。

先复制您的字体文件/theme/yourtheme/fonts/

为您的字体的CSS文件中/theme/yourtheme/style/fonts.css

​​

您还需要向@字体面上面复制到/theme/yourtheme/style/custom.css这样的字体正确显示。

编辑/lib/editor/tinymce/lib.php和线$fontselectlist = empty($config->fontselectlist) ? '' : $config->fontselectlist;后这2行添加到function get_init_params()(这是在Moodle中2.5)

$contentcss .= ', /theme/yourtheme/style/fonts.css'; 
    $fontselectlist .= ';Your font=yourfont'; 

清除缓存/admin/purgecaches.php刷新浏览器和现在的字体应该在那里。

+0

非常感谢您的回复。我尝试了这些步骤。在编辑器中,它也显示在下拉列表中,但在输入时不起作用。 – MiNdFrEaK 2014-10-03 17:20:23