API reference
<tng-code-editor> is a model-backed form component with an optional highlighting adapter.
Value and form state
| Input / output | Type | Default |
|---|---|---|
value / valueChange | string / output<string> | '' |
disabled, readonly, required | boolean-like | false |
rows | number | 10 |
placeholder, id, name | string | null | null |
Highlighting
| Input | Type | Default | Notes |
|---|---|---|---|
language, adapter, theme | string | null | null | Passed to the registered highlighting adapter. |
highlight | boolean | true | Disable to keep the escaped plain-text overlay. |
highlightDebounceMs | number | 75 | Delays adapter work during rapid editing. |
sanitizeHtml | boolean | 'auto' | 'auto' | Trusted adapter HTML is bypassed only when explicitly false. |
renderStateChange | output | — | Emits highlighting, highlighted, idle, and error transitions. |
Native textarea contract
tabSize defaults to 4. Accessible naming accepts ariaLabel, ariaLabelledby, ariaDescribedBy, ariaInvalid, and ariaRequired. Autocomplete, autocorrect, autocapitalization, spellcheck, and wrapping use code-oriented defaults.
Render lifecycle
The editor paints escaped source immediately, debounces adapter work, ignores stale async results, and retains plain source when an adapter is unsupported or fails.