From 57feedbf2534aabefa194bbcb3f3ad2fa52bf128 Mon Sep 17 00:00:00 2001 From: Nithin David Thomas <1277421+nithindavid@users.noreply.github.com> Date: Mon, 28 Aug 2023 15:46:10 +0530 Subject: [PATCH] fix: Fixes extra backslash while breaking paragraphs [CW-1505] (#7457) Co-authored-by: Pranav Raj S Co-authored-by: Muhsin Keloth --- .../components/widgets/WootWriter/Editor.vue | 14 +++++++------- package.json | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue index 0cde6d4ff589..70ef740243eb 100644 --- a/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue +++ b/app/javascript/dashboard/components/widgets/WootWriter/Editor.vue @@ -211,18 +211,18 @@ export default { showVariables(updatedValue) { this.$emit('toggle-variables-menu', !this.isPrivate && updatedValue); }, - value(newValue = '') { - if (newValue !== this.contentFromEditor) { - this.reloadState(); + value(newVal = '') { + if (newVal !== this.contentFromEditor) { + this.reloadState(newVal); } }, editorId() { this.showCannedMenu = false; this.cannedSearchTerm = ''; - this.reloadState(); + this.reloadState(this.value); }, isPrivate() { - this.reloadState(); + this.reloadState(this.value); }, updateSelectionWith(newValue, oldValue) { @@ -258,9 +258,9 @@ export default { this.focusEditorInputField(); }, methods: { - reloadState() { + reloadState(content = this.value) { this.state = createState( - this.value, + content, this.placeholder, this.plugins, this.enabledMenuOptions diff --git a/package.json b/package.json index 31fd7941e6c7..8ab021ff71d9 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,7 @@ "prepare": "husky install", "size": "size-limit" }, - "size-limit": [ - { + "size-limit": [{ "path": "public/packs/js/widget-*.js", "limit": "270 KB" },