(this page was created automatically. In case of formatting issues, please visit the official Wiki Page)

Code Editor

Overview

Code Editor overview

Specs

Tokens

Token Description
height Editor height in px or %.
theme Visual theme (Dark/Light).
defaultLanguage Fallback syntax language.
hidden Toggle visibility in form.
saveInLocalStorage Persist content between sessions.
defaultValue Initial code content.
readonly Prevent editing when true.
dataField Field name for form submission.
controlsRequestType Where data is sent: BODY/HEADER/PATH.
validation Container for validation rules.
required (Validation) Content must be provided.
email (Validation) Validate as email address.
maxLength (Validation) Maximum characters allowed.
minLength (Validation) Minimum characters required.
pattern (Validation) Regex pattern to validate content.
authorizationDisable Policy to disable based on permissions.
events Configurable component events.
ON_VALUE_CHANGE (Events) Fires when content changes.
ON_INIT (Events) Fires on component initialization.
ON_DESTROY (Events) Fires when component is removed.

Structure

(Configured in Non-Visual Properties)

(Configured in Visual Properties)

Styling

(Configured in Visual Properties)

Styling tab for the Code Editor

Actions & Variants

(Configured in Visual Properties)

Readonly message

(Configured in Events)

Validation

(Configured in Validation)

Authorization

(Configured in Authorization)

Links

Figma: tba Live style guide: tba

Guidelines

Usage

Sizing & Layout

States & Feedback

Data-Driven / Conditional Behavior

Content & Localization

Dos & Don’ts

Do Don’t Article setting(s)
Set defaultLanguage to the expected syntax so highlighting is stable. Rely solely on auto-detection and accept mismatched highlighting. defaultLanguage
Pre-fill a minimal valid template. Start empty when strict formatting is required. defaultValue
Persist drafts between sessions. Risk data loss on reloads. saveInLocalStorage
Enforce rules with validation. Depend on user memory for format rules. validation.required, validation.minLength, validation.maxLength, validation.pattern
Disable edits for review or policy. Leave the editor editable when changes aren’t allowed. readonly, authorizationDisable
Give users enough vertical space to work. Force excessive scrolling with a tiny viewport. height
Choose a theme for readable contrast. Switch themes arbitrarily mid-task. theme

Accessibility