diff --git a/common/deps.ts b/common/deps.ts index d5473af1..b19792b2 100644 --- a/common/deps.ts +++ b/common/deps.ts @@ -106,6 +106,7 @@ export { } from "https://esm.sh/@codemirror/legacy-modes@6.3.2/mode/sql?external=@codemirror/language&target=es2022"; export { rust as rustLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.2/mode/rust?external=@codemirror/language&target=es2022"; export { css as cssLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.2/mode/css?external=@codemirror/language&target=es2022"; +export { html as htmlLanguage } from "@codemirror/lang-html"; export { python as pythonLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.2/mode/python?external=@codemirror/language&target=es2022"; export { protobuf as protobufLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.2/mode/protobuf?external=@codemirror/language&target=es2022"; export { shell as shellLanguage } from "https://esm.sh/@codemirror/legacy-modes@6.3.2/mode/shell?external=@codemirror/language&target=es2022"; diff --git a/web/editor_state.ts b/web/editor_state.ts index 4a232c6d..1c365962 100644 --- a/web/editor_state.ts +++ b/web/editor_state.ts @@ -61,6 +61,7 @@ import { attachmentExtension, pasteLinkExtension, } from "./cm_plugins/editor_paste.ts"; +import { htmlLanguage } from "https://esm.sh/v130/@codemirror/lang-html@6.4.3/X-ZS9AY29kZW1pcnJvci9hdXRvY29tcGxldGUsQGNvZGVtaXJyb3IvbGFuZy1jc3MsQGNvZGVtaXJyb3IvbGFuZ3VhZ2UsQGNvZGVtaXJyb3Ivc3RhdGUsQGxlemVyL2h0bWwsQGxlemVyL2xy/dist/index.js"; export function createEditorState( editor: Client, @@ -159,6 +160,10 @@ export function createEditorState( name: "css", support: new LanguageSupport(StreamLanguage.define(sqlLanguage)), }), + LanguageDescription.of({ + name: "html", + support: new LanguageSupport(htmlLanguage), + }), LanguageDescription.of({ name: "python", alias: ["py"],