Hindi fonts are not working in CKEditor?

…衆ロ難τιáo~ 提交于 2019-12-02 11:20:38

It works for me. Check out the jsFiddle. Perhaps you extend config.font_names when it's not defined yet or use the wrong name of the font.

CKEDITOR.addCss( "@font-face {" +
  "font-family: 'Lobster';" +
  "font-style: normal;" +
  "font-weight: 400;" +
  "src: local('Lobster'), url(http://fonts.gstatic.com/s/lobster/v9/NIaFDq6p6eLpSvtV2DTNDQLUuEpTyoUstqEm5AMlJo4.woff) format('woff');" +
"}" );

CKEDITOR.replace( 'editor', {
    toolbarGroups: [
        { name: 'mode' },
        { name: 'basicstyles' },
        { name: 'styles' }
    ],
    on: {
        configLoaded: function() {
            this.config.font_names += ';Lobster';
        }
    }
} );
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!