Open
Description
When a question answerer presses check
, the page reloads, from the form submit, and the user loses their undo history. Question answerers should not lose their edit history when clicking check on, at minimum, the current question they are working on.
This is bad for beginner programmers who may forget which line they just changed. Being able to use ctrl+z after submitting code could help them to remember what they changed, and see what effect that had.
Proposed changes:
- Update ace editor library for new API features.
- Can use
EditSession.fromJSON
- and
EditSession.toJSON
- Can use
- Store the ace editor's session history in the browser's session storage, when clicking check (on sync event).
- Load this session history iff the code is the same, when the ace editor loads.
- Would need to use textareaid or similar as the key.
- Possible memory issue if large code/lots of edits/questions, might be nice to only store the last question or last X questions editor history
Metadata
Metadata
Assignees
Labels
No labels