From b80d7b8e4e3bdef2cea5bb29a616436c71e71e42 Mon Sep 17 00:00:00 2001 From: d-e-v-esh <59534570+d-e-v-esh@users.noreply.github.com> Date: Tue, 23 Feb 2021 22:42:01 +0530 Subject: [PATCH] fix(ui-markdown-editor): fixes cursor movement around headings - #260 Signed-off-by: d-e-v-esh <59534570+d-e-v-esh@users.noreply.github.com> --- packages/ui-markdown-editor/src/utilities/toolbarHelpers.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ui-markdown-editor/src/utilities/toolbarHelpers.js b/packages/ui-markdown-editor/src/utilities/toolbarHelpers.js index 96e302b9..0f79d19a 100644 --- a/packages/ui-markdown-editor/src/utilities/toolbarHelpers.js +++ b/packages/ui-markdown-editor/src/utilities/toolbarHelpers.js @@ -102,6 +102,7 @@ export const insertHeadingbreak = (editor) => { const text = { object: 'text', text: '' }; const n = { object: "block", type: 'paragraph', children: [text] }; Transforms.insertNodes(editor, n); + Transforms.move(editor, { distance: 1, unit: 'character' }) return; }