File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
packages/react/src/components/FormattingToolbar/DefaultButtons Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ import {
88 isTableCellSelection ,
99 StyleSchema ,
1010} from "@blocknote/core" ;
11- import { FormattingToolbarExtension } from "@blocknote/core/extensions" ;
11+ import {
12+ FormattingToolbarExtension ,
13+ ShowSelectionExtension ,
14+ } from "@blocknote/core/extensions" ;
1215
1316import { useComponentsContext } from "../../../editor/ComponentsContext.js" ;
1417import { useBlockNoteEditor } from "../../../hooks/useBlockNoteEditor.js" ;
@@ -42,8 +45,12 @@ export const CreateLinkButton = () => {
4245 const dict = useDictionary ( ) ;
4346
4447 const formattingToolbar = useExtension ( FormattingToolbarExtension ) ;
48+ const { showSelection } = useExtension ( ShowSelectionExtension ) ;
4549
4650 const [ showPopover , setShowPopover ] = useState ( false ) ;
51+ useEffect ( ( ) => {
52+ showSelection ( showPopover ) ;
53+ } , [ showPopover , showSelection ] ) ;
4754
4855 const state = useEditorState ( {
4956 editor,
You can’t perform that action at this time.
0 commit comments