Now, the openLinkBubbleMenu editor command takes an optional anchorEl option. If the anchorEl is provided, it's used to override the anchor point for positioning the bubble menu. Each call to openLinkBubbleMenu will reset the anchor based on the provided argument. If not provided, the bubble menu will be anchored to the location in the editor content where the link appears or will appear (as was previously always the case, with out the ability to override).
Now the MenuButtonEditLink uses the anchorEl option to anchor the menu button to the MenuButtonEditLink, so that when clicking to open the menu, it appears right next to where you clicked:
Screenshots
Clicking the button:
Clicking an existing link directly (or using the shortcut key to open the menu):
Resolves https://github.com/sjdemartini/mui-tiptap/issues/53 (see comment here https://github.com/sjdemartini/mui-tiptap/issues/53#issuecomment-1595937019)
Now, the
openLinkBubbleMenu
editor command takes an optionalanchorEl
option. If theanchorEl
is provided, it's used to override the anchor point for positioning the bubble menu. Each call toopenLinkBubbleMenu
will reset the anchor based on the provided argument. If not provided, the bubble menu will be anchored to the location in the editor content where the link appears or will appear (as was previously always the case, with out the ability to override).Now the
MenuButtonEditLink
uses theanchorEl
option to anchor the menu button to theMenuButtonEditLink
, so that when clicking to open the menu, it appears right next to where you clicked:Screenshots
Clicking the button:
Clicking an existing link directly (or using the shortcut key to open the menu):