vue-tiptap-wrap
v0.1.6
Published
vue2+tiptap quick strat
Downloads
17
Maintainers
Readme
vue-tiptap-wrap
start
npm i vue-tiptap-wrap
and in your page
import tiptap from 'vue-tiptap-wrap'
<tiptap v-model="msg">
upload
if you want to upload images
<tiptap v-model="msg" :setImage="setImage" :action="action" :headers="headers" :params="params" :accept="accept"/>
example
data() {
return {
action: 'https://www.example.com/upload',
headers: {
Authorization: 'abcdefg',
},
params: {
storeId: '123456',
},
accept: 'image/*',
}
},
methods:{
setImage(editor, data) {
editor.chain().focus().setImage({ src: data.file_url }).run();
}
}
see upload params detail in ElementUI https://element.eleme.cn/#/en-US/component/upload
resources
https://www.tiptap.dev/ https://element.eleme.cn/
License
MIT