From 83ab648e930288b494ccc7565a73d40d81a6a532 Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Mon, 16 Dec 2019 11:42:37 +0100 Subject: [PATCH] Add back @roschaefer changes - maintain reactive placeholders --- webapp/components/Editor/Editor.vue | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/webapp/components/Editor/Editor.vue b/webapp/components/Editor/Editor.vue index 3310b8f87..6c8a1908a 100644 --- a/webapp/components/Editor/Editor.vue +++ b/webapp/components/Editor/Editor.vue @@ -24,7 +24,6 @@ import { Editor, EditorContent } from 'tiptap' import { History } from 'tiptap-extensions' import linkify from 'linkify-it' -import stringHash from 'string-hash' import { replace, build } from 'xregexp/xregexp-all.js' import * as key from '../../constants/keycodes' @@ -108,17 +107,6 @@ export default { }, }, watch: { - value: { - immediate: true, - handler: function(content, old) { - const contentHash = stringHash(content) - if (!content || contentHash === this.lastValueHash) { - return - } - this.lastValueHash = contentHash - this.$nextTick(() => this.editor.setContent(content)) - }, - }, placeholder: { immediate: true, handler: function(val) { @@ -247,11 +235,7 @@ export default { }, onUpdate(e) { const content = e.getHTML() - const contentHash = stringHash(content) - if (contentHash !== this.lastValueHash) { - this.lastValueHash = contentHash - this.$emit('input', content) - } + this.$emit('input', content) }, toggleLinkInput(attrs, element) { if (!this.isLinkInputActive && attrs && element) {