Skip to content

<notatio-code>

<notatio-code language="wolfram" value="Binomial[n, k]"> -- a small code box for source in a named language (wolfram, python, javascript, latex, json, glsl, …). Read-only by default (a <pre>), or an editable <textarea> that emits notatio-code-change with { value }. Syntax highlighting is a planned enhancement -- #render is the single seam where a highlighter would turn the value into markup.

packages/notatio-lit/src/notatio-code.ts· in Vue: <Code>

Attributes

AttributeTypeDefaultNotes
languagestring""Syntax highlighting to apply, e.g. wolfram, python, javascript, glsl, wgsl.
valuestring""The source text. Editable unless readonly.reflects
readonlybooleantrueShow the code without allowing edits.reflects
rowsnumber0Visible height, in lines.
hide-lang
property hideLang
booleanfalseHide the corner language tag, when the form is already indicated elsewhere.