danyaPostfactum / modx-ckeditor

CKEditor integration into MODx Revolution
19 stars 19 forks source link

"Browse Server" button opens MODX browser when trying to add an image to content instead of dialog. #40

Open GarretOverstreet opened 2 years ago

GarretOverstreet commented 2 years ago

I can't add an image to content. The Browse Server button doesn't work as expected.

halftrainedharry commented 1 year ago

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

dimasites commented 3 months ago

FYI: All fixes already in new package versions since 1.4.2 and later. No need manual changes now.