ckeditor5 图片上传地址配置,ckeditor5和4的图片上传配置有点不一样。首先是确定你选的上传支持插件是什么,我这里是下面这个插件
ckfinder upload adapter
ckfinder upload adapter
以次控件配置图片上传地址为:
ClassicEditor
                .create( document.querySelector( '#contentHtml' ), {
                    licenseKey: '',
                    ckfinder: {
                        uploadUrl: "/ajax/form/admin/file/blogUploadImage?type=Image"//图片上传路径
                    },
                    
                } )
                .then( editor => {
                    editor.setData($('#cocntentScript').html());
                    window.editor = editor;
                } )
                .catch( error => {
                    console.error( 'Oops, something went wrong!' );
                    console.error( 'Please, report the following error on https://github.com/ckeditor/ckeditor5/issues with the build id and the error stack trace:' );
                    console.warn( 'Build id: l1txv9x2i4j9-f8u2t0fifydx' );
                    console.error( error );
                } );
就是对应的ckfinder:{uploadUrl:'地址'}



 

评论区域

评论功能已关闭. 提示:评论功能虽已关闭,关闭之前的评论仍然会展示。