mdx-editor / mdx-editor/editor
HTML P tags are not handled correctly
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 307
- Avg merge
- 14h 22m
- Merged PRs (30d)
- 5
Description
After pasting HTML as the default value, an error appears when trying to edit:
TypeError
Cannot read properties of null (reading 'append')
something is with the parsing, because the <p> tag without attributes wraps the whole content or every tag <p> is wraped by other <p> without attributes
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox and its App.tsx reproduction, then inspect the HTML paste/parsing path used by the editor. Paste HTML containing p tags without attributes and verify that editing no longer throws the reported TypeError and that the paragraph structure is preserved correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100