1.首先我将ueditor(下载地址:https://ueditor.baidu.com/website/download.html 本人下载jsp-utf-8版)放在项目static下,

2.然后在需要使用ueditor编辑器的js(这里在newsdetail.js引入)引入ueditor的三个js

3.再在vue钩子函数mounted初始化ueditor

 mounted(){
		var ue = UE.getEditor('editor');
	},

4.最后在newsdetail.vue写入 

<script id="editor" type="text/plain" style="width:100%;height:300px;"></script>

温馨提醒:如果ueditor需要刷新一下网页才能出来的话,那就在var ue = UE.getEditor('editor');上面添加 UE.delEditor('editor');

 mounted(){
		UE.delEditor('editor');
	    var ue = UE.getEditor('editor');
	},

vue前端框架引入ueditor

vue前端框架引入ueditorvue前端框架引入ueditor

相关文章:

  • 2022-01-10
  • 2021-08-16
  • 2022-12-23
  • 2022-12-23
  • 2021-05-05
  • 2022-01-10
  • 2021-09-21
  • 2022-12-23
猜你喜欢
  • 2021-11-30
  • 2021-10-07
  • 2021-11-30
  • 2021-11-30
相关资源
相似解决方案