codemirror-lang-notation3
v0.0.3
Published
Notation3 language support for CodeMirror
Downloads
4
Readme
CodeMirror Notation3 Language Support
A CodeMirror extension that provides Notation3 syntax highlighting and language support.
Most of the code and grammar for this extension were written by Achraf
Atauil for their
codemirror-lang-turtle
extension.
Usage
import { basicSetup } from 'codemirror';
import { EditorView } from '@codemirror/view';
import { EditorState } from '@codemirror/state';
import { notation3 } from 'codemirror-lang-notation3';
const doc = `
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix : <http://example.org/>.
{
:weather a :Raining
} => {
:weather a :Cloudy
} .
`
new EditorView({
state: EditorState.create({
doc,
extensions: [
basicSetup,
notation3(),
],
}),
parent: document.querySelector('#editor'),
});