Skip to content

Commit

Permalink
fix: static text only save inner text (#227)
Browse files Browse the repository at this point in the history
this will break styled text, but i think plain text is more used.
chrome adds unnecessary tags so only saving text for now
  • Loading branch information
maharshivpatel authored Apr 9, 2024
1 parent 0458486 commit 5ae3589
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5ae3589

Please sign in to comment.