From 3f8b4c89502b5d79cd1dd3f674e4588a4e0f4e2e Mon Sep 17 00:00:00 2001 From: Micle Bu Date: Sat, 18 Apr 2020 20:47:27 +0800 Subject: [PATCH] feat(editor): Editor options, close #1 --- README.md | 9 ++++++ package.json | 2 +- quasar.conf.js | 1 + src/components/QuasarTiptap.vue | 39 ++++++++++++++++++++--- src/data/article.js | 4 +++ src/data/editor.js | 34 ++++++++++++++++++++ src/pages/examples/basic.vue | 55 +++++++++++++-------------------- 7 files changed, 105 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 26ed998..83fa288 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,15 @@ export default { ``` +### Editor Properties + +| **Property** | **Type** | **Default** | **Description** | +| --- | :---: | :---: | --- | +| `content` | `Object\|String` | `null` | The editor content | +| `editable` | `Boolean` | `true` | When set to `false` the editor is read-only. | +| `extensions` | `Array` | `[]` | A list of extensions used, by the editor. This can be `String`, `Nodes`, `Marks` or `Plugins`. | +| `toolbar` | `Array` | `[]` | A list of toolbar button used, by the editor. This can be `String`, Vue components | + ## Extensions ### Available Extensions diff --git a/package.json b/package.json index f158879..d538fb2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "quasar-tiptap", - "version": "1.0.3-development", + "version": "1.0.4", "description": "A modern WYSIWYG rich-text editor built on top of tiptap and Quasar for Vue.js", "productName": "Quasar Tiptap", "scripts": { diff --git a/quasar.conf.js b/quasar.conf.js index 3fd1bc6..bbfb449 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -60,6 +60,7 @@ module.exports = function (ctx) { 'QAvatar', 'QColor', 'QInput', + 'QToggle', ], directives: [ diff --git a/src/components/QuasarTiptap.vue b/src/components/QuasarTiptap.vue index 1540d57..46d7891 100644 --- a/src/components/QuasarTiptap.vue +++ b/src/components/QuasarTiptap.vue @@ -1,7 +1,7 @@ - + + @@ -22,7 +23,6 @@