diff --git a/app/editor/components/SelectionToolbar.tsx b/app/editor/components/SelectionToolbar.tsx index f9e5609b3..3b5b94b07 100644 --- a/app/editor/components/SelectionToolbar.tsx +++ b/app/editor/components/SelectionToolbar.tsx @@ -49,8 +49,9 @@ function useIsActive(state: EditorState) { return true; } if ( - isNodeActive(state.schema.nodes.code_block)(state) || - isNodeActive(state.schema.nodes.code_fence)(state) + (isNodeActive(state.schema.nodes.code_block)(state) || + isNodeActive(state.schema.nodes.code_fence)(state)) && + selection.from > 0 ) { return true; }