mavon-editor使⽤⽅法以及回显
    <div class="bianji markdown-body">
<mavon-editor
ref="md"
@change="handleMarkdownChange"
@imgAdd="handleEditorImgAdd"
@imgDel="imgDel"
:ishljs="true"
v-model="form.doc"
/>
</div>
import { mavonEditor } from "mavon-editor";
import "mavon-editor/dist/css/index.css";
主要点为:图⽚上传在不经过处理时,maveonEditor 会将其转换成base64图,当再次请求到图⽚回显时,会是⼀⼤段的base64的代码,所以上传图⽚时要先上传的到服务器,拿到服务器图⽚链接,这样回显时也会是图⽚链接。
  handleEditorImgAdd(pos, file){
var newdate = new FormData();
newdate.append("file", file);
pushFileUnload(newdate).then((res) => {  //图⽚上传到服务器返回图⽚url 链接
console.log(res);
this.$refs.md.$img2Url(pos, res.data.url);  //通过ref插⼊到⽂档中
});editor记忆方法
},