Hi,
We ran into an issue when adding uploading a file for a link in CKEditor. Looking at the code that handles the POST method for $::richtext::ckeditor4::ckfinder_url/upload
, the reply section for the view_url
returns a script instead of a JSON object expected from the front.end. We made the following change below to the packages/richtext-ckeditor4/tcl/ckfinder-init.tcl and it seems to have fixed the issue -
- set reply [subst {
- <script type="text/javascript">
- window.parent.CKEDITOR.tools.callFunction("$CKEditorFuncNum", "$view_url", "");
- </script>
- }]
We replaced it with
+ set reply [subst {{
+ "uploaded": [dict get $d success],
+ "fileName": "[dict get $d name]",
+ "url": "$view_url"
Is there a case were script
is needed? Thank you.
Regards,
Khy