WangEditor在vue中编辑内容之后,再次获取渲染问题

在编辑器中编辑了内容,发送到服务器之后,再次获取内容编辑时,渲染时如下问题,请问是怎么回事?
图片描述

初始化编辑器的代码如下

//初始化编辑器
            initEditor: function () {
                let editor = new WangEditor('#editorElem');
                editor.customConfig.onchange = (html) => {
                    this.form.messageContent = html
                };
                editor.customConfig.uploadImgShowBase64 = true;
                editor.create();
                if(this.editFlag === '1'){
                    editor.txt.html(this.form.messageContent);
                }
                return editor
            }
阅读 9.8k
4 个回答

上传的图片被webpack编码成base64了,需要使用blob转换一下,具体百度吧

editor.customConfig.uploadImgShowBase64 = false;

试试,同时自己写上传函数

楼主这个问题解决了吗?我也遇到了,能否讲解一下

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题