Commit 21fcbf17 authored by surmon's avatar surmon
Browse files

fix #46

parent 10f59ceb
{
"name": "vue-quill-editor",
"version": "2.1.8",
"version": "2.2.0",
"description": "quill editor component for Vue2",
"main": "./src/index.js",
"scripts": {
......
......@@ -63,10 +63,11 @@
self.options.theme = self.options.theme || 'snow'
self.options.boundary = self.options.boundary || document.body
self.options.modules = self.options.modules || self.defaultModules
self.options.modules.toolbar = self.options.modules.toolbar || self.defaultModules.toolbar
self.options.modules.toolbar = self.options.modules.toolbar !== undefined
? self.options.modules.toolbar
: self.defaultModules.toolbar
self.options.placeholder = self.options.placeholder || 'Insert text here ...'
self.options.readOnly = self.options.readOnly !== undefined ? self.options.readOnly : false
self.options.modules.toolbar = self.options.modules.toolbar || defaultOptions.modules.toolbar
self.quill = new Quill(self.$refs.editor, self.options)
// set editor content
......
......@@ -46,7 +46,9 @@ const quillEditor = {
options.readOnly = options.readOnly || defaultOptions.readOnly
options.boundary = options.boundary || defaultOptions.boundary
options.placeholder = options.placeholder || defaultOptions.placeholder
options.modules.toolbar = options.modules.toolbar || defaultOptions.modules.toolbar
options.modules.toolbar = options.modules.toolbar !== undefined
? options.modules.toolbar
: defaultOptions.modules.toolbar
quill = _this[instanceName] = new Quill(el, options)
// data init
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment