modx-ckeditor
modx-ckeditor copied to clipboard
"Browse Server" button opens MODX browser when trying to add an image to content instead of dialog.
I can't add an image to content. The Browse Server button doesn't work as expected.
There is an error in version 1.4.1-pl of this extra.
To fix it, go to the file manager/assets/components/ckeditor/modx.htmleditor.js and change the line 86
var query = {a: 'media/browser', source: MODx.config['default_media_source']};
to
var query = {a: 'browser', source: MODx.config['default_media_source']};
(or for MODX 2.x you can also use the line from version 1.4.0)
https://github.com/danyaPostfactum/modx-ckeditor/blob/bf2b969ecd3f25f8d5c4b7fbf6dd22ef3cc54b8e/manager/assets/components/ckeditor/modx.htmleditor.js#L86
Related topic in the MODX forum: https://community.modx.com/t/linking-documents-in-ckeditor/6284
FYI: All fixes already in new package versions since 1.4.2 and later. No need manual changes now.