diff --git a/src/components/markdownEditor/view/markdownEditorView.tsx b/src/components/markdownEditor/view/markdownEditorView.tsx index ab6be1546..22c7145d5 100644 --- a/src/components/markdownEditor/view/markdownEditorView.tsx +++ b/src/components/markdownEditor/view/markdownEditorView.tsx @@ -108,9 +108,8 @@ const MarkdownEditorView = ({ }, []); useEffect(() => { - let bodyLength = bodyText.length; if (!isPreviewActive) { - _setTextAndSelection({ selection: { start: bodyLength, end: bodyLength }, text: bodyText }); + _setTextAndSelection({ selection: bodySelection, text: bodyText }); } }, [isPreviewActive]);