Markdown source editor bound to a string attribute.
| Builder | F.markdown(attribute: string): MarkdownField |
| Wire type key | markdown |
| Class chain | MarkdownField → Field |
| Detail projection | text-entry |
| Column counterpart | text cell, i.e. C.text(attribute) |
Example
import { F } from '@adonia/core'
F.markdown('body').label('Body').preview('side-by-side').rows(24).maxLength(50_000)Props
Beyond the shared field DSL:
| Prop | Declared on | Behaviour |
|---|---|---|
preview(mode: MarkdownPreview): this |
MarkdownField |
Preview layout; side-by-side by default (§7.3). |
rows(count: number): this |
MarkdownField |
Initial editor height in rows; the client’s default applies when unset. |
toolbar(...items: string[]): this |
MarkdownField |
Restricts the editor’s toolbar to the listed markdown constructs ('bold', 'link', 'code', …). A rendering hint only: markdown typed by hand is still markdown, so the server neither enforces nor strips anything the toolbar omits. |
Validation
Vine base: vine.string().
§11.1 mapping: vine.string() with the declared length bounds.
No trim(): two trailing spaces are a hard line break in markdown, and
a validator that removed them would silently rewrite the document.
Contributed by MarkdownField.vineSchema() in packages/core/src/schema/fields/markdown.ts. The shared modifiers (required, nullable, requiredWhen, unique, optionality) are applied on top by Field.buildValidation, and a rules() override replaces the base entirely — the validator compiler never branches on the field class.
Declared in
packages/core/src/schema/fields/markdown.ts—MarkdownField