1.0.0-beta.21 • Published 6 months ago

@surrealdb/codemirror v1.0.0-beta.21

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

@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/codemirror

Next, 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

6 months ago

1.0.0-beta.20

8 months ago

1.0.0-beta.19

9 months ago

1.0.0-beta.17

10 months ago

1.0.0-beta.18

10 months ago

1.0.0-beta.16

10 months ago

1.0.0-beta.15

11 months ago

1.0.0-beta.13

11 months ago

1.0.0-beta.14

11 months ago

1.0.0-beta.12

12 months 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