left4me/l4d2web/scripts/editor-src
mwiegand bfc8b82c00
feat(editor-v2): editor-entry façade wiring all extensions
Replaces the Task 1 stub. Builds an EditorView with:
- history, line numbers, active-line highlight, bracket matching,
  close brackets, indent-on-input
- default + custom HighlightStyle
- light/dark theme via matchMedia-driven Compartment with a
  prefers-color-scheme change listener
- language via Compartment (swappable for the files-modal dropdown)
- autocomplete via Compartment (only if vocab is provided)
- keymap stack: closeBrackets, default, history, completion, indentWithTab

Mounts the EditorView immediately before the textarea, hides the
textarea. Exposes window.__editor.mount(textarea, opts) returning a
controller with getValue / setContent / setLanguage / destroy.

bash language comes via @codemirror/legacy-modes/mode/shell wrapped
in StreamLanguage.define — same mechanism as srccfg.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 01:57:23 +02:00
..
.gitignore scaffold(editor-v2): pin cm6 deps + editor-src skeleton 2026-05-17 01:54:06 +02:00
autocomplete.js feat(editor-v2): autocomplete completion source 2026-05-17 01:56:45 +02:00
editor-entry.js feat(editor-v2): editor-entry façade wiring all extensions 2026-05-17 01:57:23 +02:00
package-lock.json scaffold(editor-v2): pin cm6 deps + editor-src skeleton 2026-05-17 01:54:06 +02:00
package.json scaffold(editor-v2): pin cm6 deps + editor-src skeleton 2026-05-17 01:54:06 +02:00
srccfg-mode.js feat(editor-v2): srccfg StreamLanguage mode 2026-05-17 01:55:59 +02:00
themes.js feat(editor-v2): light + dark themes + syntax highlight style 2026-05-17 01:56:26 +02:00