editor: do not convert \n characters to paragraphs

This commit is contained in:
Abdullah Atta
2023-04-06 01:40:55 +05:00
parent 851364c0bf
commit f1609aaa46
7 changed files with 6 additions and 8 deletions

View File

@@ -118,7 +118,7 @@ export function useEditorController(update: () => void): EditorController {
if (!editor) break;
const { from, to } = editor.state.selection;
editor?.commands.setContent(htmlContentRef.current, false, {
preserveWhitespace: "full"
preserveWhitespace: true
});
editor.commands.setTextSelection({
from,