@webwriter/code
Version:
Write and run code as a code cell. Supports several languages (HTML, JavaScript/TypeScript, Python, Java, WebAssembly).
15 lines (12 loc) • 393 B
text/typescript
import { html } from "@codemirror/lang-html";
import { LanguageModule } from "../../shared/ww-code-template";
import CodeHTML from "../ww-code-html";
const executeHTML = (code: string, context: CodeHTML) => {
context.results = [code];
return code;
};
export const htmlModule: LanguageModule = {
name: "HTML",
executionFunction: executeHTML,
languageExtension: html(),
};