From 06f055a25157dac259084d8bed244fed4f11dbe2 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 14 Jul 2020 20:29:32 +0200 Subject: [PATCH] Add option to show editor by default while still having the option to show preview --- src/components/input/editor.vue | 11 +++++++++-- src/views/labels/ListLabels.vue | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/components/input/editor.vue b/src/components/input/editor.vue index f3a3ff2af..652f1b770 100644 --- a/src/components/input/editor.vue +++ b/src/components/input/editor.vue @@ -54,6 +54,10 @@ type: Boolean, default: true, }, + previewIsDefault: { + type: Boolean, + default: true, + }, }, data() { return { @@ -210,8 +214,11 @@ }, beforeMount() { this.text = this.value - if (this.hasPreview) { - this.$nextTick(this.renderPreview) + + if (this.previewIsDefault) { + if (this.hasPreview) { + this.$nextTick(this.renderPreview) + } return } diff --git a/src/views/labels/ListLabels.vue b/src/views/labels/ListLabels.vue index ab9cab024..3056627db 100644 --- a/src/views/labels/ListLabels.vue +++ b/src/views/labels/ListLabels.vue @@ -58,7 +58,7 @@