CM6 demo
✓ Published0🌍 Public
CCurran Kelleher
Last edited Apr 29, 2019
Created on Mar 14, 2019
This example demonstrates a browser-based code editor with syntax highlighting, line numbers, bracket matching, and undo/redo functionality. It constructs an `EditorState` with extensions including legacy JavaScript mode parsing, multiple selections, and custom keybindings. The editor view renders into a DOM element, showing a sample script that reads from the filesystem. The implementation uses the `@datavis-tech/codemirror-6-prerelease` package, which exposes APIs like `EditorState.create`, `EditorView`, `legacyMode`, `lineNumbers`, and `matchBrackets`.
AI-generated descriptionA direct port of the codemirror.next demo to vanilla JS, using the NPM package @datavis-tech/codemirror-6-prerelease.
Built with blockbuilder.org
mit Licensed