Description
Is your feature request related to a problem? Please describe.
We have Embed blocks that render URLs as individual blocks (basically either link previews or more involved components for certain sites). In our link menu, we give users the option to embed a link, which removes the link from the content and turns it into an Embed block. In other words, we take the block where the link is located and split it into 3 blocks:
- A block with all the text before the link
- The new Embed block for the URL of the link
- A block with all the text after the link
Describe the solution you'd like
The props for the link menu should expose both the block for the link and the location of the link inside the block's content.
Describe alternatives you've considered
We've implemented this on our end, but it relies on text matching to identify the block and link in question. This is very error prone, because the same URL could appear multiple times in the same document.
Additional context
Demo of the feature https://www.loom.com/share/769b2e7cc0504bffb3236fd6cc6d3c00?sid=1dc0ff87-5c20-4fd1-88b4-a9b296520171
Bonus
- I'm a sponsor and would appreciate if you could look into this sooner than later 💖