Open gtraxx opened 10 months ago
Because ResponsiveFileManager plugin does not support tinymce version 6 yet:
Fairly easy to correct.
Remove the following line from your tinymce initialisation: external_filemanager_path: "/cms/scripts/filemanager/",
Add the following to your tinymce initialisation: setup: function (editor) { editor.options.register('external_filemanager_path', { processor: 'string', default: '/cms/scripts/filemanager/' }); }, Those two will fix the tinymce initialisation but there is a little more that you have to do. For this next part you will need to "beautify" the plugins.min.js file so that you can edit it easily.
Find the following lines: editor.settings.file_picker_types = 'file image media'; editor.settings.file_picker_callback = filemanager;
Replace it with: editor.options.register('file_picker_types', { processor: 'string', default: 'file image media' });
editor.options.register('file_picker_callback', { processor: 'function', default: filemanager });
A little further down in the file look for the following line: if (editor.settings.external_filemanager_path.toLowerCase().indexOf(event.origin.toLowerCase()) === 0) {
Replace it with: if (editor.options.get('external_filemanager_path').toLowerCase().indexOf(event.origin.toLowerCase()) === 0) {
That should do the trick.
@jshster Hi, This line does not work for me because it cannot find the right path, previously this was what worked. it's ok :
external_filemanager_path: '/'+baseadmin+'/template/js/vendor/filemanager/',
but not this one
setup: function (editor) {
editor.options.register('external_filemanager_path', {
processor: 'string',
default: '/'+baseadmin+'/template/js/vendor/filemanager/'
});
}
@nikzad-avasam We have updated various files for compatibility so it is compatible with tinymce 6, but there are still some minor bugs.
@jshster Hi, This line does not work for me because it cannot find the right path, previously this was what worked. it's ok :
external_filemanager_path: '/'+baseadmin+'/template/js/vendor/filemanager/',
but not this one
setup: function (editor) { editor.options.register('external_filemanager_path', { processor: 'string', default: '/'+baseadmin+'/template/js/vendor/filemanager/' }); }
Hey gtraxx, sorry for delay in replying. What error are you receiving in the console? At a glance it will be scope issue. How have you defined the variable baseadmin? Var, let or something else? I'm going to bet the error is undefined or not defined, something like that?
I upgraded to version 6.x a long time ago so I don't remember everything, but you definitely need to add option registration via "editor.options.register"
Hi, from time to time I get the message: "plugin initialization failure: filemanager" in tinymce 6 Is this a script to correct in the plugin or is it in tinymce 6 ?
Best Regards Aurélien