Skip to content

Commit

Permalink
Merge pull request PrestaShop#19776 from NeOMakinG/issue19408
Browse files Browse the repository at this point in the history
Allow developers to use their own tinymce config
  • Loading branch information
PierreRambaud authored Nov 19, 2020
2 parents e9624dc + 0046bf5 commit d9dcd43
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/admin/tinymce.inc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ function tinySetup(config) {
selector: '.rte',
plugins: 'align colorpicker link image filemanager table media placeholder advlist code table autoresize',
browser_spellcheck: true,
toolbar1: 'code,colorpicker,bold,italic,underline,strikethrough,blockquote,link,align,bullist,numlist,table,image,media,formatselect',
toolbar1:
'code,colorpicker,bold,italic,underline,strikethrough,blockquote,link,align,bullist,numlist,table,image,media,formatselect',
toolbar2: '',
external_filemanager_path: baseAdminDir + 'filemanager/',
filemanager_title: 'File manager',
Expand All @@ -71,6 +72,10 @@ function tinySetup(config) {
rel_list: [{title: 'nofollow', value: 'nofollow'}]
};

if (typeof window.defaultTinyMceConfig !== 'undefined') {
Object.assign(default_config, window.defaultTinyMceConfig);
}

$.each(default_config, function(index, el) {
if (config[index] === undefined) config[index] = el;
});
Expand Down

0 comments on commit d9dcd43

Please sign in to comment.