Skip to content

Instantly share code, notes, and snippets.

@stevewithington
Created November 20, 2017 19:01
Show Gist options
  • Save stevewithington/e863982be7c92dd56f45c20099533a06 to your computer and use it in GitHub Desktop.
Save stevewithington/e863982be7c92dd56f45c20099533a06 to your computer and use it in GitHub Desktop.
Mura CMS: CKEditor has 2 image plugins, and you can easily use either of them on a theme-by-theme basis.
/*
There are two (2) image plugins available for CKEditor:
The "Image" plugin (https://ckeditor.com/cke4/addon/image), which is used by default;
and the "Enhanced Image" plugin (https://ckeditor.com/cke4/addon/image2), which offers the ability to caption images.
To enable the "Enhanced Image" plugin, follow these instructions:
1. Edit the file located under {ThemeName}/js/editor/config.js.cfm
(if the file doesn't exist, create it ... if the config.js.cfm.txt file exists, rename it to remove '.txt')
2. Add the following code to the config.js.cfm file.
3. Reload your browser (you may also have to clear your browser cache).
*/
if ( 'CKEDITOR' in window) {
CKEDITOR.editorConfig = function( config ) {
config.extraPlugins += ',image2';
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment