【发布时间】:2019-08-09 13:33:02
【问题描述】:
我正在使用 CKEditor4-react 并想添加 EasyImage 插件但不使用云服务 URL。作为替代,我在服务器上托管了一个文件夹,它应该上传图像。但它不起作用。
我按照文档使用 EasyImage 插件 - https://ckeditor.com/docs/ckeditor4/latest/examples/easyimage.html https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-cloudServices_uploadUrl
根据它,“cloudServices_uploadUrl”对于 EasyImage 插件是强制性的。
我可以提供一个托管在我们服务器上的备用 URL,以便可以从那里保存和获取图像吗?
CKEditor4 的旧版本用于我们在 Knockout.js 中构建的旧版应用程序之一,它以类似的方式使用 ckeditor/plugin/simpleuploads。
但是我在当前CKEditor4.12版本中没有找到这样的插件
config: {
toolbar: [
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike'] },
{ name: 'clipboard', items: ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo'] },
{ name: 'insert', items: ['Link', 'EasyImageUpload', 'Table'] },
{ name: 'styles', items: ['Styles', 'FontSize', 'Font', 'Format', 'TextColor', 'BGColor'] },
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] }
],
height: 600,
width: 950,
extraPlugins: 'easyimage',
removePlugins: 'image',
//cloudServices_uploadUrl: 'https://33333.cke-cs.com/easyimage/upload/', //this is a demo ckeditor cloud service URL
cloudServices_uploadUrl: '/app/Data' //this is folder hosted on our server which is accessible as localhost/app/data
},
【问题讨论】:
标签: reactjs ckeditor ckeditor4.x