A better way to do this would be a transaction filter that forbids multiline changes. Something like…
EditorState.transactionFilter.of(tr => tr.newDoc.lines > 1 ? [] : tr)
A better way to do this would be a transaction filter that forbids multiline changes. Something like…
EditorState.transactionFilter.of(tr => tr.newDoc.lines > 1 ? [] : tr)