Installation
Installer
Section titled “Installer”npx vertex-editor ./publicInstall the read-only variant:
npx vertex-editor ./public --liteThe same installer can be streamed without installing a package:
curl -fsSL https://raw.githubusercontent.com/Andersseen/vertex/main/scripts/install.mjs | node - ./publicPlain HTML
Section titled “Plain HTML”<script src="/web-editor.min.js"></script>
<vertex-editor value="const answer: number = 42;" language="typescript" theme="dark" line-numbers="true" height="360px" aria-label="TypeScript editor"></vertex-editor>For read-only display, load web-editor-lite.min.js and use
<vertex-editor-lite>.
Loading rules
Section titled “Loading rules”- Load each bundle once.
- Wait for the
readyevent before relying on methods that need CodeMirror. - Set boolean attributes to
"true"or"false". - Use properties or
setValue()for frequent programmatic updates. - Always provide a useful
aria-labelin context.