diff options
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({ |
