MCPcopy Create free account
hub / github.com/EmNudge/watlings / createJsEditor

Function createJsEditor

web-build/src/editor.ts:539–550  ·  view source on GitHub ↗
(
  parent: HTMLElement,
  initialCode: string,
  onChange?: (code: string) => void,
)

Source from the content-addressed store, hash-verified

537}
538
539export function createJsEditor(
540 parent: HTMLElement,
541 initialCode: string,
542 onChange?: (code: string) => void,
543): WatEditor {
544 return buildEditor(
545 parent,
546 initialCode,
547 [javascript(), keymap.of(baseKeymap), closeBrackets(), autocompletion()],
548 onChange,
549 );
550}
551
552export async function createEditor(
553 parent: HTMLElement,

Callers

nothing calls this directly

Calls 1

buildEditorFunction · 0.85

Tested by

no test coverage detected