diff options
| author | Elizabeth Hunt <me@liz.coffee> | 2026-01-04 22:21:24 -0800 |
|---|---|---|
| committer | Elizabeth Hunt <me@liz.coffee> | 2026-01-04 22:23:06 -0800 |
| commit | 95e121dded311009d119ff12753ff4be4b869177 (patch) | |
| tree | 081ab584fb9634d598ed05bf913a9f6691bd82b5 /src/ts/editor.ts | |
| parent | 7023dc1f29ff747a9d2fc3bf0cf0ec3fffacd0b1 (diff) | |
| download | adelie-95e121dded311009d119ff12753ff4be4b869177.tar.gz adelie-95e121dded311009d119ff12753ff4be4b869177.zip | |
Add tabloid language support
Diffstat (limited to 'src/ts/editor.ts')
| -rw-r--r-- | src/ts/editor.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ts/editor.ts b/src/ts/editor.ts index ebc6b9b..1c52569 100644 --- a/src/ts/editor.ts +++ b/src/ts/editor.ts @@ -2,6 +2,7 @@ import { EditorView, minimalSetup } from 'codemirror'; import { javascript } from '@codemirror/lang-javascript'; import { css } from '@codemirror/lang-css'; import { html } from '@codemirror/lang-html'; +import { tabloid } from '@emprespresso/codemirror-lang-tabloid'; import { EditorState, Compartment } from '@codemirror/state'; import { syntaxHighlighting, HighlightStyle } from '@codemirror/language'; import { tags } from '@lezer/highlight'; @@ -237,7 +238,7 @@ const darkTheme = EditorView.theme( interface EditorOptions { parent: HTMLElement; - language?: 'javascript' | 'css' | 'html'; + language?: 'javascript' | 'css' | 'html' | 'tabloid'; initialCode?: string; theme?: 'light' | 'dark'; } @@ -249,6 +250,7 @@ export function createEditor(options: EditorOptions): EditorView { javascript, css, html, + tabloid, }[language]; const state = EditorState.create({ |
