用于剪贴板图片粘贴
How to use...
- install this module
npm install quill-yang-image-paste
- import module from
node_modules
import 'quill-yang-image-paste';
- For Example (Vue.js)
<template lang="html">
<div class="quill">
<quill-editor v-model="content">
</quill-editor>
</div>
</template>
<script>
import Quill from 'quill';
import {quillEditor} from 'vue-quill-editor'; // use `vue-quill-editor` component refs[https://www.npmjs.com/package/vue-quill-editor]
import ImagePaste from 'quill-yang-image-paste';
import 'quill/dist/quill.core.css';
import 'quill/dist/quill.snow.css';
Quill.register('modules/imagePaste', ImagePaste);
export default {
components: {
quillEditor
},
data() {
return {
content: '<h2>I am an Example</h2>',
editorOption: {
modules: {
imagePaste: true
}
}
};
}
};
</script>
<style>
</style>
enjoy~