Editable regions
- Vorherrschende Sprache
- Haskell
- Sterne
- 1.3k
- Forks
- 201
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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.
Beitragsleitfaden
Rechercherichtung
Beginne mit der Untersuchung der CodeMirror-Integration für eingebettete Editoren und verfolge anschließend, wie die Verarbeitung von Tastendrücken, der Lexer und CSS-Stile miteinander verbunden sind. Lege fest, wie bearbeitbare Bereiche angegeben werden und wie sich das Verhalten im Nur-Lesen-Modus und die visuelle Gestaltung verhalten sollen; da das Issue keine Dateien oder Tests nennt, muss der Implementierungspfad zunächst durch Recherche im Projekt ermittelt werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- css, haskell
- Bereich
- frontend, web-dev
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100