1.0.0-beta.21 • Published 8 months ago
@surrealdb/codemirror v1.0.0-beta.21
@surrealdb/codemirror
This library provides full support for the SurrealQL language within your CodeMirror editors.
Some features include:
- Intelligent SurrealQL highlighting
- Folding support for blocks, objects, and arrays
- Automatic indentation support
- Support for comment toggling
- Embedded JavaScript highlighting
How to install
Install it with:
# using npm
npm i @surrealdb/codemirror
# or using pnpm
pnpm i @surrealdb/codemirror
# or using yarn
yarn add @surrealdb/codemirrorNext, just import it with:
const { surrealql } = require("@surrealdb/codemirror");or when you use modules:
import { surrealql } from "@surrealdb/codemirror";Example usage
import { surrealql } from "@surrealdb/codemirror";
const state = EditorState.create({
doc: "SELECT * FROM table",
extensions: [
surrealql()
]
});
const editor = new EditorView({
parent: document.getElementById("editor"),
state: state,
});1.0.0-beta.21
8 months ago
1.0.0-beta.20
10 months ago
1.0.0-beta.19
11 months ago
1.0.0-beta.17
1 year ago
1.0.0-beta.18
12 months ago
1.0.0-beta.16
1 year ago
1.0.0-beta.15
1 year ago
1.0.0-beta.13
1 year ago
1.0.0-beta.14
1 year ago
1.0.0-beta.12
1 year ago
1.0.0-beta.11
1 year ago
1.0.0-beta.10
1 year ago
1.0.0-beta.9
1 year ago
1.0.0-beta.8
1 year ago
1.0.0-beta.7
1 year ago
1.0.0-beta.6
1 year ago
1.0.0-beta.5
1 year ago
1.0.0-beta.4
1 year ago
1.0.0-beta.3
1 year ago
1.0.0-beta.2
1 year ago
1.0.0-beta.1
1 year ago