Quantcast
Channel: CKEditor™ Provider for DNN®
Viewing all articles
Browse latest Browse all 1992

New Post: Installing Google Open Sans font in CKEditor

$
0
0
Well there is a solution, but it has to be defined for each tag, for example for p tags
CKEDITOR.on('instanceReady', function (event) {
    event.editor.dataProcessor.htmlFilter.addRules({
        elements: {
            p: function (e) { e.attributes.style = 'font-family: Open Sans;'; 
            }
        }
    });
});
Put that JS Code in a js file in the home directory and in the Editor 'Main Settings' set it under Custom JS File (If the js file is not visible make sure that js file types are set as allowed file extension in the host settings)

Viewing all articles
Browse latest Browse all 1992