Add modules to Editor (#4452)
parent
1598c11055
commit
4dd5b46a2f
|
@ -28,6 +28,12 @@ const EditorProps = [
|
|||
type: "any",
|
||||
default: "null",
|
||||
description: "Inline style of the container."
|
||||
},
|
||||
{
|
||||
name: "modules",
|
||||
type: "object",
|
||||
default: "null",
|
||||
description: "Modules configuration, see <a href=\"https://quilljs.com/docs/modules/\">here</a> for available options."
|
||||
}
|
||||
];
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ declare class Editor extends Vue {
|
|||
readonly?: boolean;
|
||||
formats?: any[];
|
||||
editorStyle?: string;
|
||||
modules?: any;
|
||||
$emit(eventName: 'input', event: string): this;
|
||||
$emit(eventName: 'text-change', e: { htmlValue: string, textValue: any, delta: any, source: string}): this;
|
||||
$slot: {
|
||||
|
|
|
@ -56,7 +56,8 @@ export default {
|
|||
placeholder: String,
|
||||
readonly: Boolean,
|
||||
formats: Array,
|
||||
editorStyle: null
|
||||
editorStyle: null,
|
||||
modules: null
|
||||
},
|
||||
quill: null,
|
||||
watch: {
|
||||
|
@ -69,7 +70,8 @@ export default {
|
|||
mounted() {
|
||||
this.quill = new Quill(this.$refs.editorElement, {
|
||||
modules: {
|
||||
toolbar: this.$refs.toolbarElement
|
||||
toolbar: this.$refs.toolbarElement,
|
||||
...this.modules
|
||||
},
|
||||
readOnly: this.readonly,
|
||||
theme: 'snow',
|
||||
|
|
Loading…
Reference in New Issue