From 5ae358931db25b8dbe0cf706e15d5dfdb3567828 Mon Sep 17 00:00:00 2001 From: Maharshi Patel <39730881+maharshivpatel@users.noreply.github.com> Date: Tue, 9 Apr 2024 16:13:27 +0530 Subject: [PATCH] fix: static text only save inner text (#227) this will break styled text, but i think plain text is more used. chrome adds unnecessary tags so only saving text for now --- .../public/js/print_designer/components/base/BaseStaticText.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/print_designer/public/js/print_designer/components/base/BaseStaticText.vue b/print_designer/public/js/print_designer/components/base/BaseStaticText.vue index 9bd0d83..33df3ab 100644 --- a/print_designer/public/js/print_designer/components/base/BaseStaticText.vue +++ b/print_designer/public/js/print_designer/components/base/BaseStaticText.vue @@ -214,7 +214,7 @@ const handleBlur = (e) => { width.value = targetRect.width + 2; height.value = targetRect.height + 2; } - content.value = DOMRef.value.firstElementChild.innerHTML; + content.value = DOMRef.value.firstElementChild.innerText; // This will break styled texts :( MainStore.getCurrentElementsId.includes(id.value) && DOMRef.value.classList.add("active-elements"); contenteditable.value = false;