Skip to content

Advanced Configuration

Matt Williams edited this page May 31, 2017 · 1 revision

CKEditor is a feature-rich What You See Is What You Get (WYSIWYG) editor plugin, with many customisable options. I will not detail the specific changes that can be made, as this job is better done by the CKEditor Documentation. If you wish to alter any of these settings, then this can be done in the files under application/config/ckeditor.

One of the limitations of the mod as default is the editor creates an iframe to contain the content you are typing - which means that the styles you apply to your site via the skin files will often not translate through to the editor area. To get around this, an extra CSS file is called to define editor-specific styles. A minimal file is provided already at application/views/_base_override/admin/css/content.css - however this file will apply equally to all skins which pull this file in, and so it may not be possible to set the colours in such a way as to work well across all skins. If you wish to have styles set on a per-skin basis, then you should follow the below steps:

First, copy application/views/_base_override/admin/css/content.css to application/views/<skin_name>/admin/css/. You can then make whatever alterations to the file you wish to for the skin in question.

Then copy the files under application/views/_base_override/admin/js/ into application/views/<skin_name>/admin/js/. Modify each of these files and alter the following lines:
customConfig: '/application/config/ckeditor/posts.js' or customConfig: '/application/config/ckeditor/news_messages.js'
to:
customConfig: '/application/config/ckeditor/<skin_name>-posts.js' or customConfig: '/application/config/ckeditor/<skin_name>-news_messages.js'

Then copy /application/config/ckeditor/posts.js and /application/config/ckeditor/news_messages.js and rename them to match the above. Then edit both of those files and change the following line to point to your new content.css file you created earlier:
config.contentsCss = '//example.com/application/views/_base_override/admin/css/contents.css';
(remembering to replace example.com with your site's URL)

Clone this wiki locally