ckeditor5 图片上传地址配置

位置:首页>文章>详情   分类: 教程分享 > WEB基础   阅读(1434)   2024-03-11 19:24:50

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:'地址'}



 

地址:https://www.leftso.com/article/1125.html

相关阅读

ckeditor5 图片上传地址配置,ckeditor5和4的图片上传配置有点不一样。首先是确定你选的上传支持插件是什么,我这里是下面这个插件ckfinder upload adapter以次控...
在CKEditor4版本中,对于编辑器高度设置是通过config配置里面的属性height来实现的,如下方所示CKEditor5 版本查文档发现已经没有这个配置了,通过网络资料查询得知,CKEd...
CKeditor无论那个版本,在我主要以文章编辑的时候,需要去掉默认的H1标签,所以需要自定义配置heading标签。同样CKeditor5 与之前的4版本有所不同。CKeditor5自定义配置...
在ckeditor4的时候绑定blur事件代码如下:window.editor.on('blur',function(){//这里写你想做的事儿})同样的代码搬到ckeditor5不仅不能用,还...
CKeditor5代码片段是官方自己集成的。可以通过在线构建的时候选择Code blocks 组件。选择后默认支持一下代码语言,是通过pre标签+code标签实现的。[ { langu...
CKEditor 5 不重新构建移除某个plugin控件组件参考代码:ClassicEditor .create( document.querySelector...
CKeditor5 默认情况下的fontsize组件是小号默认大号特大号这种,没有具体的字体大小px单位选择,有些时候需要配置。故而对默认配置进行了修改。配置方式如下: C...
方案一$("#dialog-modal").modal({backdrop:"static",//点击空白处不关闭对话框show:false,//按esc键盘不关闭.})方案二在弹框元素(下面以...
问题描述JQuery_ajax formData 上传文件报错:Uncaught TypeError: Illegal invocationJquery 版本2.1.4$.ajax({ ty...
使用方法toFixed.使用案例letwidth=5.556;console.log(width.toFixed(2))输出内容:5.56使用提示,toFixed必须是数字类型,如果是字符串需要...