lexical icon indicating copy to clipboard operation
lexical copied to clipboard

Bug: Insert an image inside another image's caption

Open MaxPlav opened this issue 1 year ago • 4 comments

Currently, a user can insert an image inside another image's caption which may cover up or deface the original image. Probably a variety of elements that can be inserted in an image's caption should be limited.

Lexical version:

Steps To Reproduce

  1. Open https://playground.lexical.dev/ in Chrome
  2. Insert a sample image
  3. Click on the image caption
  4. Go to the Toolbar and insert "Image"
  5. Select from "URL".
  6. Insert a new image URI.
  7. See that the new image covers the original one.

The current behavior

https://github.com/facebook/lexical/assets/5062807/efb8e972-6d74-4f86-b2b1-d61cd4ed3794

The expected behavior

A user is not able to insert an image into the caption.

MaxPlav avatar May 15 '24 17:05 MaxPlav

IMO, we shall be running there nested editor that supports only basic rich text (see examples/react-rich setup). Maybe even plain text only?

StyleT avatar May 15 '24 22:05 StyleT

Hi Maxplav, I'm Rabel Mervin, I'm reaching out because I'm interested in contributing this project Could you please provide me any processes I should follow to solve this Issue ?

rabelmervin avatar May 16 '24 09:05 rabelmervin

Hi Maxplav, I'm Rabel Mervin, I'm reaching out because I'm interested in contributing this project Could you please provide me any processes I should follow to solve this Issue ?

Hi! You can start here: https://github.com/facebook/lexical/blob/main/CONTRIBUTING.md

StyleT avatar May 16 '24 18:05 StyleT

Thanks @StyleT for your help.

rabelmervin avatar May 17 '24 06:05 rabelmervin