So... How do I configure the inline editor to use custom plugins? Ideally, can this be done per instance. Loading it traditionally I would use a config file passed on replace with the following in the config file:
(function () {
CKEDITOR.plugins.addExternal('image', CKEDITOR.basePath + '../../plugins/image/', 'plugin.js');
CKEDITOR.plugins.addExternal('link', CKEDITOR.basePath + '../../plugins/link/', 'plugin.js');
CKEDITOR.plugins.addExternal('flash', CKEDITOR.basePath + '../../plugins/flash/', 'plugin.js');
CKEDITOR.plugins.addExternal('htmltemplates', CKEDITOR.basePath + '../../plugins/htmltemplates/', 'plugin.js');
})();CKEDITOR.editorConfig = function (config) {
// Define changes to default configuration here.
// For the complete reference:
// http://docs.ckeditor.com/#!/api/CKEDITOR.config
var self = this;config.docType = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'
config.emailProtection = 'encode';
config.removePlugins = 'autogrow,codemirror,devtools,divarea,confighelper,htmlbuttons'
config.extraPlugins = 'image,link,flash,htmltemplates';config.toolbar = [
['Maximize', 'Source', '-', 'NewPage', 'Preview', '-', 'ShowBlocks', 'htmltemplates'],
['Fieldslabel'],
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Print', 'Scayt'],
['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
['Bold', 'Italic', 'Underline', 'StrikeThrough', '-', 'Subscript', 'Superscript'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote', 'CreateDiv'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Link', 'Unlink', 'Anchor'],
['Image', 'imgmapPopup', 'TextWrapping', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak'],
['Styles', 'Format', 'Font', 'FontSize'], ['TextColor', 'BGColor', 'helloworld.btn']
];
}
but, I'm not sure how this is done when using inline.
My inline setup is like this:
$(document).on('enable-editing.ui', function(event, data){
CKEDITOR.on('instanceCreated', function( event ) {var editor = event.editor,
element = editor.element;if(data.target == element.$)
setTimeout(function(){editor.focus();}, 500);
if ( $(element).hasClass('minimal') ) {
editor.on( 'configLoaded', function() {// Remove unnecessary plugins to make the editor simpler.
editor.config.removePlugins = 'colorbutton,find,flash,font,forms,iframe,image,newpage,removeformat,smiley,specialchar,stylescombo,templates';
// Rearrange the layout of the toolbar.
editor.config.toolbarGroups = [
{ name: 'editing', groups: [ 'basicstyles', 'links' ] },
{ name: 'undo' },
{ name: 'clipboard', groups: [ 'selection', 'clipboard' ] }
];
});
}
});
(function () {
CKEDITOR.plugins.addExternal('image', CKEDITOR.basePath + '../../plugins/image/', 'plugin.js');
CKEDITOR.plugins.addExternal('link', CKEDITOR.basePath + '../../plugins/link/', 'plugin.js');
CKEDITOR.plugins.addExternal('flash', CKEDITOR.basePath + '../../plugins/flash/', 'plugin.js');
})();CKEDITOR.config.emailProtection = 'encode';
CKEDITOR.config.removePlugins = 'autogrow,codemirror,devtools,divarea,confighelper,htmlbuttons'
CKEDITOR.config.extraPlugins = 'image,link,flash';CKEDITOR.config.toolbar = [
['Maximize', 'Source', '-', 'NewPage', 'Preview', '-', 'ShowBlocks'], //'htmltemplates',
['Fieldslabel'],
['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Print', 'Scayt'],
['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
['Bold', 'Italic', 'Underline', 'StrikeThrough', '-', 'Subscript', 'Superscript'],
['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote', 'CreateDiv'],
['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
['Link', 'Unlink', 'Anchor'],
['Image', 'imgmapPopup', 'TextWrapping', 'Flash', 'Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'PageBreak'],
['Styles', 'Format', 'Font', 'FontSize'], ['TextColor', 'BGColor', 'helloworld.btn']
];CKEDITOR.config.filebrowserBrowseUrl = '/System/Sysapps/File Manager/Browse.aspx';
CKEDITOR.config.filebrowserFlashBrowseUrl = '/System/Sysapps/File Manager/Browse.aspx';
CKEDITOR.config.filebrowserImageBrowseLinkUrl = '/System/Sysapps/File Manager/Browse.aspx';
CKEDITOR.config.filebrowserImageBrowseUrl = '/System/Sysapps/File Manager/Browse.aspx';
CKEDITOR.config.filebrowserImageUploadUrl = '/uploader/upload.php?type=Images';
CKEDITOR.config.filebrowserUploadUrl = '/uploader/upload.php';CKEDITOR.config.filebrowserWindowFeatures = 'resizable=yes,scrollbars=no';
CKEDITOR.config.filebrowserWindowHeight = 580;
CKEDITOR.config.filebrowserWindowWidth = 750;CKEDITOR.config.dialog_backgroundCoverColor = '#000000'
var editable = CKEDITOR.dtd.$editable;
delete editable.h1;
CKEDITOR.dtd.$editable = editable;CKEDITOR.inlineAll();
});
Unfortunatly, the external plugins do not load this way. Any ideas?