lexical icon indicating copy to clipboard operation
lexical copied to clipboard

Feature: Link over an image

Open MrVibe opened this issue 2 years ago • 2 comments

Allow link on an image. So currently you can insert image in the editor but you can not link the image to some link which is a common practice in HTML.

MrVibe avatar Jun 13 '23 01:06 MrVibe

There's nothing in lexical stopping you from creating link over image or inserting image inside of link.

If it's specific to the playground they it's better not to treat it as have-it-all editor that is copy-pastable into real app, as it's more for showcasing of various features and e2e tests. PRs are welcome if want to add something new!

fantactuka avatar Jun 14 '23 00:06 fantactuka

@fantactuka I think the issue is not specific to the link plugin implemented by the playground, but rather that the @lexical/link packages $toggleLink helper only works for RangeSelection. Whereas when you click to select an ImageNode you have a NodeSelection.

https://github.com/facebook/lexical/blob/main/packages/lexical-link/src/index.ts#L490-L492

mkdynamic avatar Aug 26 '24 02:08 mkdynamic