Skip to content

Commit

Permalink
editor: when adding a block with slash command, that block is now foc…
Browse files Browse the repository at this point in the history
…used
  • Loading branch information
iskaktoltay committed Aug 28, 2023
1 parent b406902 commit 3a44439
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function insertOrUpdateBlock<BSchema extends HDBlockSchema>(
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!)
Expand Down

0 comments on commit 3a44439

Please sign in to comment.