Skip to content

Yangholmes/quill-yang-image-paste

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quill 剪贴板图片粘贴插件

用于剪贴板图片粘贴

How to use...

  1. install this module
npm install quill-yang-image-paste
  1. import module from node_modules
import 'quill-yang-image-paste';
  1. 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~

Releases

No releases published

Packages

No packages published