Editable regions
Open
discussion
- Dominant language
- Haskell
- Stars
- 1.3k
- Forks
- 201
- PR merge metrics
- No merged PRs in 30d
Description
One thing that would be extremely useful for embedded editors (see #1248) is defining regions of the source that should be considered editable, and others that should be considered fixed. This could be done in CodeMirror by adding a listener for key presses, which would check if the current selections and insertion points are all in editable regions, and set the read-only bit on the document accordingly. At the same time, the lexer could set a special style on tokens in the non-editable range, and that could be associated with a CSS style that grays out these areas, so the student sees which sections of the code are editable.
Contributor guide
Assessment
This issue has not been assessed yet.