Skip to content

Commit

Permalink
fix: static text only save inner text
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 committed Apr 9, 2024
1 parent 3b60df9 commit c34f5f9
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 c34f5f9

Please sign in to comment.