vue前端框架引入ueditor 左手的ㄟ右手 2022-03-07 08:46 446阅读 0赞 1.首先我将ueditor(下载地址:[https://ueditor.baidu.com/website/download.html][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'); }, ![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzMyNzQxOTcz_size_16_color_FFFFFF_t_70][] ![20190316161801707.png][]![watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzMyNzQxOTcz_size_16_color_FFFFFF_t_70 1][] [https_ueditor.baidu.com_website_download.html]: https://ueditor.baidu.com/website/download.html [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzMyNzQxOTcz_size_16_color_FFFFFF_t_70]: /images/20220307/73e416906f97439cb80b09b03d54810e.png [20190316161801707.png]: https://img-blog.csdnimg.cn/20190316161801707.png [watermark_type_ZmFuZ3poZW5naGVpdGk_shadow_10_text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3FxXzMyNzQxOTcz_size_16_color_FFFFFF_t_70 1]: /images/20220307/0434f3bf57bb414d85403514b53be253.png
还没有评论,来说两句吧...