Skip to content

Is it possible to display the bubble menu only when the table is dragged (selected)? #5689

Discussion options

You must be logged in to vote

Self Answer

<BubbleMenu
  editor={editor}
  tippyOptions={{ placement: "bottom" }}
  shouldShow={({ editor, state }) => {
    const { selection } = state;

    const isText = isTextSelection(selection);

    return !isText && editor?.isActive("table");
  }}
>
  table bubble menu
</BubbleMenu>

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@ryuhangyeong
Comment options

@ryuhangyeong
Comment options

@nperez0111
Comment options

@kart-c
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ryuhangyeong
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants