Package Exports
- vue3-summernote-editor
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue3-summernote-editor) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Vue3 Summernote Editor
A VueJs 3 component for use Summernote WYSIWYG
Install
// npm install
npm install vue3-summernote-editor --save
You must be have jQuery
at window.$
and install summernote by yourself.
Use as component
- import as global component.
// import SummernoteEditor
import SummernoteEditor from 'vue3-summernote-editor';
const vueApp = createApp({});
vueApp.component('SummernoteEditor', SummernoteEditor);
- import into a single component.
// import SummernoteEditor
import SummernoteEditor from 'vue3-summernote-editor';
<template>
<SummernoteEditor
v-model="myValue"
@update:modelValue="summernoteChange($event)"
@summernoteImageLinkInsert="summernoteImageLinkInsert"
/>
</template>
<script>
export default {
// declare SummernoteEditor
components: {SummernoteEditor},
data() {
return {
myValue: '',
}
},
methods: {
summernoteChange(newValue) {
console.log("summernoteChange", newValue);
},
summernoteImageLinkInsert(...args) {
console.log("summernoteImageLinkInsert()", args);
},
}
}
</script>
Options
options
:option[]
- configurable settings, see Summernote options
- you can define a global options on a
window.SUMMERNOTE_DEFAULT_CONFIGS
Events
update:modelValue
- triggered when summernote value change
summernote bare events
- summernote events will be triggered in camelCase
"summernote.change": "summernoteChange"
"summernote.image.link.insert": "summernoteImageLinkInsert"