Я обновился до CKeditor4 с версии 3. К сожалению, моя загрузка файлов и изображений больше не работает.
CKeditor должен добавить некоторые параметры URL, как описано здесь: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_file_browser_api.html
CKEditor автоматически отправляет некоторые дополнительные аргументы в файловый менеджер: CKEditor = editor1 & CKEditorFuncNum = 1 & langCode = ru
Этого не происходит с версией 4.
Вот скрипка с инструкциями дляВоспроизвести: https://jsfiddle.net/5wzh9a08/1/
<html lang="de"> <head> <meta charset="utf-8" /> <script src="https://cdn.ckeditor.com/4.11.2/standard/ckeditor.js"></script> </head> <body> <h1> CKeditor 4 upload problem </h1> <p> Problem: CKeditor 4 does not append "CKEditor=editor1&CKEditorFuncNum=1&langCode=en" to the upload URL. </p> <p> How to reproduce: </p> <ul> <li>Open web developer console in browser</li> <li>Click (and enable) network tab</li> <li>In CKeditor: click on image icon</li> <li>Click "upload", select a file and click "Send to server"</li> <li>Watch the request in web developer console: the necessary url params are not added.</li> </ul> <p> Reference: <a href="https://ckeditor.com/docs/ckeditor4/latest/guide/dev_file_browser_api.html">https://ckeditor.com/docs/ckeditor4/latest/guide/dev_file_browser_api.html</a> </p> <textarea name="editor1" id="editor1" rows="8" cols="80"> test 123 </textarea> <script type="text/javascript"> CKEDITOR.replace( 'editor1', { filebrowserImageUploadUrl: '/upload.html', }); </script> </body> </html>
Помощь оценена!
Проблема решена.
CKEditor4 требуется опция
config.filebrowserUploadMethod = 'form';