Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.2k views
in Technique[技术] by (71.8m points)

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整个都出错了。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

报错信息是什么

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

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
...