cleanup cke s9y configuration file
breaks apart long paragraph group in full, adds mediaembed to default and maximize to standard toolbar References #148
This commit is contained in:
parent
b51b3dfb59
commit
1fb5bcf38e
@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @fileOverview The Serendipity CKEDITOR custom config file:
|
||||
* ckeditor_s9y_config.js, v. 1.8, last modified 2014-11-25 by Ian
|
||||
* ckeditor_s9y_config.js, v. 1.9, last modified 2014-11-26 by Ian
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -13,50 +13,62 @@
|
||||
*/
|
||||
CKEDITOR.editorConfig = function( config ) {
|
||||
|
||||
// ACF - Advanced Content Filter works in two modes:
|
||||
// automatic - the filter is configured by editor features (like plugins, buttons, and commands) that are enabled with configuration options
|
||||
// such as CKEDITOR.config.plugins, CKEDITOR.config.extraPlugins, and CKEDITOR.config.toolbar,
|
||||
// custom - the filter is configured by the CKEDITOR.config.allowedContent option and only features that match this setting are activated.
|
||||
// In both modes it is possible to extend the filter configuration by using the CKEDITOR.config.extraAllowedContent setting.
|
||||
// If you want to disable Advanced Content Filter, set CKEDITOR.config.allowedContent to true.
|
||||
// All available editor features will be activated and input data will not be filtered.
|
||||
// Allowed content rules. This setting is used when instantiating CKEDITOR.editor.filter.
|
||||
// The following values are accepted:
|
||||
// CKEDITOR.filter.allowedContentRules - defined rules will be added to the CKEDITOR.editor.filter.
|
||||
// true - will disable the filter (data will not be filtered, all features will be activated).
|
||||
// default - the filter will be configured by loaded features (toolbar items, commands, etc.).
|
||||
// In all cases filter configuration may be extended by extraAllowedContent. This option may be especially useful,
|
||||
// when you want to use the default allowedContent value along with some additional rules.
|
||||
//
|
||||
// List of regular expressions to be executed on ***input HTML***, indicating HTML source code that, when matched, must not be available in the WYSIWYG mode for editing.
|
||||
/** SECTION: ACF
|
||||
Advanced Content Filter works in two modes:
|
||||
automatic - the filter is configured by editor features (like plugins, buttons, and commands) that are enabled with configuration options
|
||||
such as CKEDITOR.config.plugins, CKEDITOR.config.extraPlugins, and CKEDITOR.config.toolbar,
|
||||
custom - the filter is configured by the CKEDITOR.config.allowedContent option and only features that match this setting are activated.
|
||||
In both modes it is possible to extend the filter configuration by using the CKEDITOR.config.extraAllowedContent setting.
|
||||
If you want to disable Advanced Content Filter, set CKEDITOR.config.allowedContent to true.
|
||||
All available editor features will be activated and input data will not be filtered.
|
||||
Allowed content rules. This setting is used when instantiating CKEDITOR.editor.filter.
|
||||
The following values are accepted:
|
||||
CKEDITOR.filter.allowedContentRules - defined rules will be added to the CKEDITOR.editor.filter.
|
||||
true - will disable the filter (data will not be filtered, all features will be activated).
|
||||
default - the filter will be configured by loaded features (toolbar items, commands, etc.).
|
||||
http://docs.ckeditor.com/?_escaped_fragment_=/guide/dev_allowed_content_rules-section-string-format#!/guide/dev_allowed_content_rules-section-string-format
|
||||
In all cases filter configuration may be extended by extraAllowedContent. This option may be especially useful,
|
||||
when you want to use the default allowedContent value along with some additional rules.
|
||||
Read more of this here:
|
||||
http://docs.ckeditor.com/?_escaped_fragment_=/guide/dev_acf#!/guide/dev_acf
|
||||
*/
|
||||
|
||||
/** List of regular expressions to be executed on ***input HTML***, indicating HTML source code, that, when matched, must not be available in the WYSIWYG mode for editing. */
|
||||
|
||||
// allow <script> tags
|
||||
//config.protectedSource.push( /<(script)[^>]*>.*<\/script>/ig ); // set already as default in ckeditor.js, by [/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi]
|
||||
//config.protectedSource.push( /<(script)[^>]*>.*<\/script>/ig ); // already set as default in ckeditor.js, by [/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi]
|
||||
// allow S9y imageselectorplus plugin mediainsert tag codes
|
||||
config.protectedSource.push( /<(mediainsert)[^>]*>[\s\S]*?<\/mediainsert>/img );
|
||||
// allow a Smarty like {} tag syntax without inner whitespace, which would be some other code part.
|
||||
config.protectedSource.push( /\{[a-zA-Z\$].*?\}/gi );
|
||||
// allow wp like [[mytag]] [[{$mytag}]] widget tags
|
||||
// allow WP like [[mytag]] [[{$mytag}]] widget tags for an imaginable markup replacements S9y plugin
|
||||
config.protectedSource.push(/\[\[([^\[\]])+\]\]/g);
|
||||
/**
|
||||
CKEDITOR.protectedSource patterns used regex Escape sequences
|
||||
\s any whitespace character;
|
||||
\S any character that is not a whitespace character
|
||||
\t tab (hex 09);
|
||||
\r carriage return (hex 0D);
|
||||
\n newline (hex 0A);
|
||||
Pattern Modifiers
|
||||
/i caseless, match both upper and lower case letters
|
||||
/m treat as multiline
|
||||
/g be greedy
|
||||
*/
|
||||
|
||||
// CKEDITOR.protectedSource patterns used regex Escape sequences
|
||||
// \s any whitespace character;
|
||||
// \S any character that is not a whitespace character
|
||||
// \t tab (hex 09);
|
||||
// \r carriage return (hex 0D);
|
||||
// \n newline (hex 0A);
|
||||
// Pattern Modifiers
|
||||
// /i caseless, match both upper and lower case letters
|
||||
// /m treat as multiline
|
||||
// /g be greedy
|
||||
|
||||
// Set placeholder tag cases - elements [attributes]{styles}(classes) to protect ACF removements.
|
||||
// Allowed <mediainsert>, <gallery>, <media> tags (imageselectorplus galleries) - which tells ACF to not touch the code!
|
||||
// Allowed <div> is a need for Media Library inserts - which tells ACF to not touch the code!
|
||||
// <img[height,width]> This Media Library image is even needed to avoid ACF OFF removement of height attributes.
|
||||
// <pre[*attributes](*classes)> for previous used prettyprints by ckeditor code plugins
|
||||
/** SECTION: Extra Allowed Content
|
||||
Set placeholder tag cases - elements [attributes]{styles}(classes) to protect ACF removements.
|
||||
- Allowed <mediainsert>, <gallery>, <media> tags (imageselectorplus galleries) - which tells ACF to not touch the code!
|
||||
- Allowed <div> is a need for Media Library inserts - which tells ACF to not touch the code!
|
||||
- Reset <img[height,width]> Media Library image inserts to avoid ACF OFF removement of height attributes. (Dependency in ckeditor_s9y_plugin.js)
|
||||
- Allow <pre[*attributes](*classes)> for custom attributes/classes in code blocks
|
||||
*/
|
||||
// protect
|
||||
config.extraAllowedContent = 'mediainsert[*]{*}(*);gallery[*]{*}(*);media[*]{*}(*);script[*]{*}(*);audio[*]{*}(*);div[*]{*}(*);img[height,width];pre[*](*);';
|
||||
|
||||
|
||||
/** SECTION: Other behaviour config rules
|
||||
|
||||
// Prevent filler nodes in all empty blocks. - case switching source and wysiwyg mode multiple times
|
||||
//config.fillEmptyBlocks = false; // default (true) - switches <p> </p> to <p></p>
|
||||
//config.ignoreEmptyParagraph = false; // default(true) - Whether the editor must output an empty value ('') if it's contents is made by an empty paragraph only. (Extends to config.fillEmptyBlocks)
|
||||
@ -73,28 +85,33 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
//config.enterMode = CKEDITOR.ENTER_BR; // inserts <br />
|
||||
// You can always use SHIFT+ENTER to set a br in the P-mode default option or change the SHIFT-mode to something else
|
||||
//config.shiftEnterMode = CKEDITOR.ENTER_BR;
|
||||
// Better learn to do it via keyboard commands, see cheatsheet toolbar button.
|
||||
// Better learn to do this via keyboard commands, see cheatsheet toolbar button.
|
||||
|
||||
// Whether to use HTML entities in the output.
|
||||
//config.entities = false; // defaults(true)
|
||||
|
||||
//config.htmlEncodeOutput = false; // defaults(true)
|
||||
*/
|
||||
|
||||
// UI configurations - just some examples
|
||||
//config.uiColor = 'transparent'; // standard, but better disable config.uiColor all
|
||||
//config.uiColor = '#CFD1CF'; // standard grey
|
||||
//config.uiColor = '#f5f5f5'; // standard light grey
|
||||
//config.uiColor = '#E6EDF3'; // extreme light blue
|
||||
//config.uiColor = '#DFE8F6'; // very light blue
|
||||
//config.uiColor = '#9AB8F3'; // light blue/violet
|
||||
//config.uiColor = '#AADC6E'; // light green
|
||||
//config.uiColor = '#FFDC6E'; // light gold
|
||||
//config.uiColor = '#FF8040'; // mango
|
||||
//config.uiColor = '#FF2400'; // scarlet red
|
||||
//config.uiColor = '#14B8C4'; // light turquoise
|
||||
|
||||
/** SECTION: UI configurations
|
||||
config.uiColor = 'transparent'; // standard, but better disable config.uiColor at all
|
||||
// just some examples
|
||||
config.uiColor = '#CFD1CF'; // standard grey
|
||||
config.uiColor = '#f5f5f5'; // standard light grey
|
||||
config.uiColor = '#E6EDF3'; // extreme light blue
|
||||
config.uiColor = '#DFE8F6'; // very light blue
|
||||
config.uiColor = '#9AB8F3'; // light blue/violet
|
||||
config.uiColor = '#AADC6E'; // light green
|
||||
config.uiColor = '#FFDC6E'; // light gold
|
||||
config.uiColor = '#FF8040'; // mango
|
||||
config.uiColor = '#FF2400'; // scarlet red
|
||||
config.uiColor = '#14B8C4'; // light turquoise
|
||||
*/
|
||||
config.skin = 'moono'; // this is default
|
||||
config.height = 400; // dito
|
||||
|
||||
/**
|
||||
// Allow certain font sizes, eg.
|
||||
//config.fontSize_sizes = '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;15/15px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px' ;
|
||||
// Allow one(!) default font label, eg.
|
||||
@ -104,28 +121,64 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
// 'Arial/Arial, Helvetica, sans-serif;' +
|
||||
// 'Times New Roman/Times New Roman, Times, serif;' +
|
||||
// 'Verdana';
|
||||
*/
|
||||
|
||||
// Add custom Serendipity styles to ckeditor wysiwyg-mode, to repect css image floats
|
||||
// we can not use templates/xxx/admin/ as a path here, since we would need template and userTemplate path parts as dynamic vars
|
||||
|
||||
/** SECTION: Custom Config Content Styles
|
||||
We can not use templates/xxx/admin/ as a path here, since we would need template and userTemplate path parts as dynamic vars
|
||||
*/
|
||||
// Add custom Serendipity styles to ckeditor content wysiwyg-mode, to repect css image floats
|
||||
config.contentsCss = 'htmlarea/wysiwyg-style.css';
|
||||
|
||||
// Native spell check functionality is by default disabled in the editor, use disableNativeSpellChecker to enable it:
|
||||
|
||||
/** SECTION: Custom Plugin and Button behaviour configurations **/
|
||||
/**
|
||||
// Native spell check functionality is by default disabled in the editor, use this to enable it.
|
||||
// Do not wonder if this is not working on demand, since Browsers need to match spell checker settings, etc., you need to hit the correct place/word, and so on.
|
||||
//config.disableNativeSpellChecker = false;
|
||||
// [CRTL + right mouse click] gives access to Browsers contextmenu, else you need to disable and set these
|
||||
// The general idea is that you would need to remove all plugins that depend on the "contextmenu" one for removing the "contextmenu" one itself to work. But this has other sideeffects!
|
||||
//config.removePlugins = 'wsc,scayt,menubutton,liststyle,tabletools,contextmenu';
|
||||
//config.browserContextMenuOnCtrl = true;
|
||||
//config.wsc_lang = 'de_DE'; //Defaults to: 'en_US'
|
||||
//config.scayt_sLang = 'de_DE'; //Defaults to: 'en_US'
|
||||
*/
|
||||
|
||||
// Remove custom toolbar buttons and plugins from all toolbars
|
||||
// A list of plugins that must not be loaded. This setting makes it possible to avoid loading some plugins defined in the CKEDITOR.config.plugins setting, without having to touch it and potentially break it.
|
||||
config.removePlugins = 'flash,iframe,forms'; // possible strict suggestions: 'flash,iframe,elementspath,save,font,showblocks,div,liststyle,pagebreak,smiley,specialchar,horizontalrule,indentblock,justify,pastefromword,newpage,preview,print,stylescombo'
|
||||
config.removeButtons = 'Preview,Styles'; // these buttons are useless in Serendipity and therefore not set. Without, even the toolbar Groups break better on screens.
|
||||
|
||||
// We cheat ckeditor instances by adding all available button names (in s9ypluginbuttons) to "both" toolbar instances, in case of having two textareas.
|
||||
// The instanciation will only take the ones being currently initiated in wysiwyg_init.tpl output, in the source code.
|
||||
// The hooked and added extraPlugins in wysiwyg_init become not automatically true for preset toolbars (Basic, Standard, Full) like this, but do for the fallback toolbarGroups later on.
|
||||
|
||||
/** SECTION: Certain Plugin Buttons
|
||||
We cheat ckeditor instances by adding all available button names (in s9ypluginbuttons) to "both" toolbar instances, in case of having two textareas.
|
||||
The instanciation will only take the ones being currently initiated in wysiwyg_init.tpl output, in the source code.
|
||||
The hooked and added extraPlugins in wysiwyg_init become not automatically true for preset toolbars (Basic, Standard, Full) like this, but do for the fallback toolbarGroups later on.
|
||||
*/
|
||||
// concat button arrays
|
||||
var s9ypluginbuttonsAll = s9ymediabuttons.concat(s9ypluginbuttons);
|
||||
|
||||
// In order to work properly within all toolbars, please do not remove the { name: 'insert', items: [ 'Image' ] }, group and Image button, since then the s9ymediabutton does not insert!
|
||||
//console.log('is ckeditor_s9y_config.js');
|
||||
|
||||
// in case of toolbar : Basic
|
||||
/** SECTION: Build Preset Toolbars
|
||||
|
||||
S9Y: Serendipity (default)
|
||||
BASIC: Serendipity (simple)
|
||||
STANDARD: Serendipity (normal)
|
||||
FULL: Serendipity (extended)
|
||||
CKE: CKEditor Full (preset)
|
||||
|
||||
PLEASE NOTE:
|
||||
1. In order to work properly within all toolbars, please do not remove the eg. { name: 'insert', items: [ 'Image' ] }, group and Image button, since then the s9ymediabutton does not properly insert!
|
||||
This ckeditor image widget is disabled/hidden by css (htmlarea/s9y_cketoolbar.css) and is only presented in the CKE PRESET toolbar.
|
||||
2. If you really configure your own toolbar, choose the named and selected toolbar which comes near to your idea and edit the one.
|
||||
*/
|
||||
|
||||
/** DEBUG core and custom file accessment
|
||||
// console.log('is ckeditor_s9y_config.js');
|
||||
// console.log('is ckeditor_custom_config.js');
|
||||
*/
|
||||
|
||||
// in case of Serendipity toolbar : "Basic"
|
||||
config.toolbar_Basic = [
|
||||
{ name: 'styles', items : [ 'Format', ] },
|
||||
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Superscript' ] },
|
||||
@ -139,7 +192,7 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
];
|
||||
// console.log(JSON.stringify(config.toolbar_Basic));
|
||||
|
||||
// in case of toolbar : Standard
|
||||
// in case of Serendipity toolbar : "Standard" (called 'Alternate' in toolbar selection, but rather is a normal Standard)
|
||||
config.toolbar_Standard = [
|
||||
{ name: 'basicstyles', items : [ 'Format','-','Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
|
||||
{ name: 'clipboard', items : [ 'Cut', 'Copy', 'Paste', 'PasteText', '-', 'Undo', 'Redo'] },
|
||||
@ -152,12 +205,13 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
{ name: 'others', items : s9ypluginbuttons },
|
||||
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source' ] },
|
||||
{ name: 'about', items : [ 'About', ] },
|
||||
{ name: 'cheatsheet', items : ['CheatSheet'] }
|
||||
{ name: 'cheatsheet', items : ['CheatSheet'] },
|
||||
{ name: 'tools', items: [ 'Maximize' ] }
|
||||
];
|
||||
// console.log(JSON.stringify(config.toolbar_Standard));
|
||||
|
||||
// in case of toolbar : Full (moved 'Source' and removed 'Font' buttons. 'Styles' and 'Preview' disabled overall. )
|
||||
// With the css hidden fix for cke image button, it is not possible to move the s9ymediabuttons in this toolbar up. Leave it in others! (fixed with break apart paragraph, which sets needed CSS IDs to CKE FULL Toolbar only! )
|
||||
// in case of Serendipity toolbar : "Full"
|
||||
// Breaks apart long paragraph group to better float (moved 'Source' and removed 'Font' buttons; 'Styles' and 'Preview' disabled overall).
|
||||
config.toolbar_Full = [
|
||||
{ name: 'styles', items : [ 'Styles','Format',/*'Font',*/'FontSize' ] },
|
||||
{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
|
||||
@ -165,6 +219,7 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
{ name: 'document', items : [ /*'Source','-',*/'Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
|
||||
{ name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
|
||||
{ name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
|
||||
// { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
|
||||
{ name: 'paragraph1', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv' ] },
|
||||
{ name: 'paragraph2', items : [ 'JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
|
||||
{ name: 'links', items : [ 'Link','Unlink','Anchor' ] },
|
||||
@ -179,7 +234,7 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
];
|
||||
// console.log(JSON.stringify(config.toolbar_Full));
|
||||
|
||||
// in case of toolbar : Default S9y
|
||||
// in case of Serendipity toolbar : Default
|
||||
config.toolbar_Default = [
|
||||
{ name: 'tools', items: [ 'Maximize' ] },
|
||||
{ name: 'styles', items: [ 'Format' ] },
|
||||
@ -190,17 +245,21 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
{ name: 'insert', items: [ 'Image', '-', 'Table', 'HorizontalRule', 'SpecialChar' ] },
|
||||
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', '-', 'Undo', 'Redo' ] },
|
||||
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ], items: [ 'Scayt' ] },
|
||||
{ name: 'mediaembed', items : [ 'MediaEmbed' ] },
|
||||
{ name: 'others', items: s9ypluginbuttons },
|
||||
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source' ] },
|
||||
{ name: 'about', items: [ 'About' ] }
|
||||
];
|
||||
// console.log(JSON.stringify(config.toolbar_s9y));
|
||||
|
||||
// This is the 'CKE PRESET' toolbar select name with CKE 'Default' values, also acting as a fallback in order. Do not touch!
|
||||
// Note: There is another (internal) fallback toolbar in case of errors, which appearance looks like a re-arranged 4-liner toolbar,
|
||||
// which will provide the 'others' group, but no additionally added plugins (like mediaembed and cheatsheet).
|
||||
// This is the official Toolbar configuration generated automatically by the editor, based on config.toolbarGroups.
|
||||
// It is more or like an untouched example for the full toolbar but underlies the same restrictions of disabled plugins or buttons.
|
||||
/**
|
||||
This is the 'CKE PRESET' toolbar select name with CKE 'Default' values, also acting as a fallback in order. Do not touch!
|
||||
Note: There is another (internal) fallback toolbar in case of errors, which appearance looks like a re-arranged 4-liner toolbar,
|
||||
which will provide the 'others' group, but no additionally added plugins (like mediaembed and cheatsheet).
|
||||
This is the official Toolbar configuration generated automatically by the editor, based on config.toolbarGroups.
|
||||
It is more or like an untouched example for the full toolbar but underlies the same restrictions of disabled plugins or buttons.
|
||||
*/
|
||||
// in case of toolbar : PRESET CKE
|
||||
config.toolbar_CKE = [
|
||||
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'Save', 'NewPage', 'Preview', 'Print', '-', 'Templates' ] },
|
||||
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ], items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] },
|
||||
@ -219,8 +278,9 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
{ name: 'about', items: [ 'About' ] }
|
||||
];
|
||||
|
||||
/*
|
||||
// This is the official Toolbar groups and order configuration. Added here for comparison with ours.
|
||||
/*config.toolbarGroups = [
|
||||
config.toolbarGroups = [
|
||||
{ name: 'document', groups: [ 'mode', 'document', 'doctools' ] },
|
||||
{ name: 'clipboard', groups: [ 'clipboard', 'undo' ] },
|
||||
{ name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] },
|
||||
@ -236,7 +296,8 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
{ name: 'tools' },
|
||||
{ name: 'others' },
|
||||
{ name: 'about' }
|
||||
];*/
|
||||
];
|
||||
*/
|
||||
|
||||
// This is the Serendipity tweaked toolbarGroups fallback, which does not need any extras manually filled in 'others', since done automatically by ckeditor.js or by the other named toolbars
|
||||
config.toolbarGroups = [
|
||||
@ -262,15 +323,18 @@ CKEDITOR.editorConfig = function( config ) {
|
||||
{ name: 'cheatsheet' }
|
||||
];
|
||||
|
||||
// Adding additional CKEDITOR Plugins to the config
|
||||
// Download the Plugin, check version matching to this ckeditor version and drop the plugin to /htmlarea/ckeditor/chkeditor/plugins.
|
||||
// Copy the directories plugin name, eg 'mediaembed'.
|
||||
// Copy the file htmlarea/ckeditor_s9y_plugin.js to either /templates/2k11/admin, or to your template in /templates/xxx/admin and rename it to ckeditor_custom_plugin.js.
|
||||
// Add the plugin name to the "extraPlugins" string.
|
||||
// Now add this name also to this files custom copy upper config.toolbarGroup, wherever you like it to have, eg. "{ name: 'mediaembed' }," if that plugin emits a button to be placed into the toolbar.
|
||||
// Or as { name: 'pluginname', items: 'PluginName' } eg { name: 'mediaembed', items: 'MediaEmbed' } in one of the upper toolbars, if that plugin emits a button to be placed into the toolbar.
|
||||
// After a browser reload, the newly added plugin should load into your textareas toolbars.
|
||||
// PLEASE NOTE:
|
||||
// Do not use any customized CKEditor Downloads, since this will only work with the CKE PRESET toolbar!
|
||||
|
||||
/** SECTION: Howto add Custom Plugins into toolbars
|
||||
1. Adding additional CKEDITOR Plugins to the config
|
||||
Download the Plugin, check version matching to this ckeditor version and drop the plugin to /htmlarea/ckeditor/chkeditor/plugins.
|
||||
Copy the directories plugin name, eg 'mediaembed'.
|
||||
Copy the file htmlarea/ckeditor_s9y_plugin.js to either /templates/2k11/admin, or to your template in /templates/xxx/admin and rename it to ckeditor_custom_plugin.js.
|
||||
Add the plugin name to the "extraPlugins" string.
|
||||
Now add this name also to this files custom copy upper config.toolbarGroup, wherever you like it to have, eg. "{ name: 'mediaembed' }," if that plugin emits a button to be placed into the toolbar.
|
||||
Or as { name: 'pluginname', items: 'PluginName' } eg { name: 'mediaembed', items: 'MediaEmbed' } in one of the upper toolbars, if that plugin emits a button to be placed into the toolbar.
|
||||
After a browser reload, the newly added plugin should load into your textareas toolbars.
|
||||
2. PLEASE NOTE:
|
||||
Do not use any customized CKEditor Downloads, since this will only work with the CKE PRESET toolbar!
|
||||
*/
|
||||
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user