Ionaru / Ionaru/easy-markdown-editor
On sending form via javascript if it wasn't edited returns undefined
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 363
- PR merge metrics
- No merged PRs in 30d
Description
When submitting the form not traditional way (submit), but with js (form.serialize()) if the field wasn't edited it serializes easyMDE field as undefined, but if the field was edited even once after page load it submits normally. It happens even if forceSync is true. Is there a way to trigger the sync so it will submit the initial value if it wasn't edited or any other way to fix this?
Contributor guide
Research direction
Start by reproducing submission with form.serialize() using an untouched EasyMDE field, then compare it with a field edited once and with forceSync enabled. Trace the editor's initial-value synchronization path; done means the untouched field serializes its initial value instead of undefined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100