Bug: Invalid HTML element nesting for image node
- Dominant language
- TypeScript
- Stars
- 23.9k
- Forks
- 2.2k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 61
Description
Lexical version: 0.12.0
## Steps To Reproduce
1. Insert an image node in the playground
## The current behavior
Inserting an image node results in the following DOM structure:
```html

```
This markup is invalid as `
` and `` are inline elements and they cannot contain block elements such as `
## The expected behavior
Invalid DOM nesting. The draggable div can be converted to a span element to fix this.
Contributor guide
Research direction
Reproduce the issue by inserting an image node in the playground and inspect the resulting DOM structure shown in the report. Find the image node rendering entry point and change the draggable div to an inline element, then verify that the generated paragraph and image markup no longer contains invalid nesting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100