Prefix TinyMCE to avoid conflicts with other plugins

This commit is contained in:
Jan Jakeš
2019-05-23 08:34:08 +02:00
committed by M. Shull
parent 8a76706a26
commit b421708e5e
3 changed files with 35 additions and 0 deletions

View File

@ -242,6 +242,30 @@ const baseConfig = {
'babel-loader',
]
},
{
test: /node_modules\/tinymce/,
loader: 'string-replace-loader',
options: {
// prefix TinyMCE to avoid conflicts with other plugins
multiple: [
{
search: 'window\\.tinymce',
replace: 'window.mailpoetTinymce',
flags: 'g',
},
{
search: 'tinymce\\.util',
replace: 'window.mailpoetTinymce.util',
flags: 'g',
},
{
search: 'resolve\\(\'tinymce',
replace: 'resolve(\'mailpoetTinymce',
flags: 'g',
},
],
},
},
]
}
};