ckeditor4 filebrowser上传网址:网址参数不会添加

问题描述 投票:0回答:1

我升级到CKeditor4从第3版。可悲的是我的文件和图片上传整合不工作了。

CKEDITOR应该添加一些网址参数如下所述:https://ckeditor.com/docs/ckeditor4/latest/guide/dev_file_browser_api.html

CKEditor的自动发送一些额外的参数文件管理器:CKEditor的= editor1&CKEditorFuncNum = 1的langCode = EN

这不符合第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>

帮助表示赞赏!

ckeditor ckeditor4.x
1个回答
0
投票

问题解决了。

CKEditor4需要的选项

config.filebrowserUploadMethod = 'form';
© www.soinside.com 2019 - 2024. All rights reserved.