Code Editor Options¶
Control editor visibility and position using code-visibility and code-position attributes.
Code visibility¶
Visible (default)¶
The code editor is shown and expanded.
Hidden¶
The code editor is completely hidden. The output is shown alone, similar to app mode but with the editor header/controls still available.
Collapsed¶
The code editor is collapsed behind a toggle button. Click Expand Code to reveal the editor; it changes to Collapse Code when expanded.
Code position¶
First (default)¶
Code appears before (above or left of) the output.
Last¶
Code appears after (below or right of) the output.
Fence syntax¶
When to use each¶
| Scenario | code-visibility |
code-position |
|---|---|---|
| Interactive tutorial | visible |
first |
| Output showcase with optional code | collapsed |
last |
| Embedded demo (no editing) | hidden |
— |
| Code-focused documentation | visible |
first |
| Result-focused documentation | visible |
last |