Make custom web font available within CKEditor content

Posted . Visible to the public.
  1. Make your custom web font available

  2. Add to ckeditor/config.js

    CKEDITOR.editorConfig = function(config) {
      config.contentsCss = [
        '/assets/myCkeditorStyles.css', // any other file to encapsulate custom styles
        '/assets/myFontFaceTags.css'  
      ];
    }
    

It's not enough to provide the font face tags within your public folder. You have to explixitly call it within the ckeditor/config.js.

You also might be interested in CKEditor asset pipline support.

Martin Straub
Last edit
License
Source code in this card is licensed under the MIT License.
Posted by Martin Straub to makandra dev (2014-02-14 15:02)