@codemirror/legacy-modes v6.5.1
@codemirror/legacy-modes 
[ WEBSITE | ISSUES | FORUM | CHANGELOG ]
This package implements a collection of ported stream
language modes for
the CodeMirror code editor. Each mode is
available as a separate script file, under
"@codemirror/legacy-modes/mode/[name]", and exports the values
listed below.
The project page has more information, a number of examples and the documentation.
This code is released under an MIT license.
We aim to be an inclusive, welcoming community. To make that explicit, we have a code of conduct that applies to communication around the project.
Usage
Using modes from this package works like this:
Install this package and the
@codemirror/languagepackage.Find the
StreamParserinstance you need in the reference below.Add
StreamLanguage.define(theParser)to your editor's configuration.
For example, to load the Lua mode, you'd do something like...
import {StreamLanguage} from "@codemirror/language"
import {lua} from "@codemirror/legacy-modes/mode/lua"
import {EditorView, basicSetup} from "codemirror"
let view = new EditorView({
extensions: [basicSetup, StreamLanguage.define(lua)]
})API Reference
8 months ago
9 months ago
7 months ago
1 year ago
1 year ago
2 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago