Switching to source mode changes editor value
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 406
- Forks
- 131
- Avg merge
- 2h 32m
- Merged PRs (30d)
- 2
Description
When switching to source mode (the first time), the value of the editor is changed:
- The html tag surrounding the content is stripped
- Some new line characters (\n) are added
Whereas the first issue is a disaster, because html wrapper contains information relevant for backend. The second issues is also nasty, but is fixable.
How to reproduce: init JoditEditor with value f.e.
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"><head><style>body{font-family:"Verlag Office",Verdana,Sans-serif; font-size: 14px;}</style></head> <body> <h2>hello</h2>/body></html>
Switch to source mode, console.log the value of the editor.
Result: tag is removed.
Contributor guide
No contributing guide indexed for this repository
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 at the JoditEditor entry point and trace the first transition into source mode while logging the editor value. Reproduce the case with the provided XHTML wrapper, then verify that the html tag and surrounding content remain intact and that no unintended newline characters are added.
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
- Clearly specified
- Newbie friendliness
- 35/100