Don't trim

This commit is contained in:
Dan Abramov
2024-04-24 01:57:37 +01:00
parent fd419278c9
commit 1c0d606137
@@ -185,7 +185,7 @@ export const TextInput = React.forwardRef(function TextInputImpl(
}, },
onUpdate({editor: editorProp}) { onUpdate({editor: editorProp}) {
const json = editorProp.getJSON() const json = editorProp.getJSON()
const newText = editorJsonToText(json) const newText = editorJsonToText(json).trimEnd() // Otherwise we have \n\n at the end
const mayBePaste = window.event?.type === 'paste' const mayBePaste = window.event?.type === 'paste'
const newRt = new RichText({text: newText}) const newRt = new RichText({text: newText})