From 3a4443968ae3ac57a9538b73a73ae0bb56f52a03 Mon Sep 17 00:00:00 2001 From: IsKEK Date: Mon, 28 Aug 2023 15:33:26 +0600 Subject: [PATCH] editor: when adding a block with slash command, that block is now focused --- .../extensions/SlashMenu/defaultSlashMenuItems.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/packages/app/src/blocknote-core/extensions/SlashMenu/defaultSlashMenuItems.tsx b/frontend/packages/app/src/blocknote-core/extensions/SlashMenu/defaultSlashMenuItems.tsx index 1d05353a33..4d109ac349 100644 --- a/frontend/packages/app/src/blocknote-core/extensions/SlashMenu/defaultSlashMenuItems.tsx +++ b/frontend/packages/app/src/blocknote-core/extensions/SlashMenu/defaultSlashMenuItems.tsx @@ -14,7 +14,7 @@ export function insertOrUpdateBlock( currentBlock.content[0].text === '/') || currentBlock.content.length === 0 ) { - editor.replaceBlocks([currentBlock.id], [block]) + editor.updateBlock(currentBlock, block) } else { editor.insertBlocks([block], currentBlock, 'after') editor.setTextCursorPosition(editor.getTextCursorPosition().nextBlock!)