I have the following for setting up the ckeditor config:
var config; if ($editor.data('toolbar') == 'basic') { config = { toolbar: [['Source'], ['Bold', 'Italic', 'Underline', 'Strike'], ['NumberedList', 'BulletedList'], ['Outdent', 'Indent', 'Blockquote', 'CreateDiv'], ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], ['Link', 'Unlink', 'Anchor']] }; } var extraConfig = new Array(); var enterMode; extraConfig = $editor.data('extratools').split(','); $.extend(true, config, { toolbar: [extraConfig] });
Where you see config = { toolbar: [['Source'], ['Bold', etc..., whatever is in the location of ['Source'] no longer displays when I use the jQuery extend as shown above. The extra configuration items are simply a comma delimited string, ("Image,Table") stored in an HTML 5 data attribute. How can I set basic toolbar and merge additional changes without losing the first group?