如何解决CkEditor5 和 CKFinder
我希望是非常基本的问题。
当我尝试使用 CKeditor 5 添加图像时,控制台中不断收到“无上传适配器”错误消息 - 阅读更多:https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-filerepository-no-upload-adapter
以下是文档中的说明。
仅配置图片上传 由于 CKFinder 上传适配器,此功能可以自动将图像上传到服务器(例如,当图像被放入内容中时)。它只需要正确的 config.ckfinder.uploadUrl 路径。 假设在https://example.com/ckfinder/下安装了CKFinder PHP服务器端连接器(可用),使用以下快速上传命令URL启用图片上传:
import CKFinder from '@ckeditor/ckeditor5-ckfinder/src/ckfinder';
ClassicEditor
.create( document.querySelector( '#editor' ),{
plugins: [ CKFinder,... ],// Enable the "Insert image" button in the toolbar.
toolbar: [ 'uploadImage',ckfinder: {
// Upload the images to the server using the CKFinder QuickUpload command.
uploadUrl: 'https://example.com/ckfinder/core/connector/PHP/connector.PHP? command=QuickUpload&type=Images&responseType=json'
}
} )
.then( ... )
.catch( ... );
我已将上述代码添加到我的编辑器存在于标签中的网页上。我这样做错了吗?是否应该将此代码添加到其他地方,在配置文件中我遗漏的其他地方?
指向相关文档的链接 - https://ckeditor.com/docs/ckeditor5/latest/features/image-upload/ckfinder.html
如果我转到示例页面,上传器工作正常 - http://example.com/ckfinder/samples/full-page-open.html
解决方法
没有得到这个工作,所以用 https://github.com/ckfinder/ckfinder-laravel-package 代替。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。