wangEditor 在vue中,如何使用自定义插件?

新手上路,请多包涵

按照demo,给出的是单独的js,想应该是在html页面里面,直接使用的。
但是在vue中,直接import,是无效的

<template lang="html">
 <div class="editor">
 <div ref="toolbar" class="toolbar">
 </div>
 <div ref="editor" class="text">
 </div>
 </div>
</template>
<script>
 import {myfun} from '@/components/wangEditor/wangEditor-fullscreen-plugin.js'
 import '@/components/wangEditor/wangEditor-fullscreen-plugin.css'

甚至Vue整个都出错了。

阅读 3.3k
1 个回答

报错信息是什么

而且css应该在style内引用吧
``<style lang="scss" scoped>
@import "~@/styles/mixin.scss";``

或者你可以吧这两个文件直接在index.html里引用

看了下git 有npm的方式可以使用
https://github.com/wangeditor...

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