@ -25,7 +25,7 @@
}
const updateText = e => {
builderStore.actions.updateProp("text", e.target.textContent)
builderStore.actions.updateProp("text", e.target.textContent.trim())
</script>
@ -47,7 +47,7 @@
// Convert contenteditable HTML to text and save
const sanitized = e.target.innerHTML.replace(/<br>/gi, "\n")
const sanitized = e.target.innerHTML.replace(/<br>/gi, "\n").trim()
builderStore.actions.updateProp("text", sanitized)
@ -46,7 +46,7 @@
@ -49,7 +49,7 @@
$: labelClass = labelPos === "above" ? "" : `spectrum-FieldLabel--${labelPos}`
const updateLabel = e => {
builderStore.actions.updateProp("label", e.target.textContent)
builderStore.actions.updateProp("label", e.target.textContent.trim())