Editor

Markdown-backed rich text surface with optional static and floating format toolbars.

Also known as: markdown editor, rich text, contenteditable

Installation

Install with the CLI, or copy the component source into your project.

Add editor (npm)

npx --yes -p github:itsvigneshv/default-file-ui#main df-ui add editor

Properties

Markdown-backed rich text surface with optional static and floating format toolbars.

Editor

PropTypeDefaultNotes
valuestring-Controlled Markdown document (required).
onChange(markdown: string) => void-Called with serialized Markdown after edits settle.
placeholderstring-Empty-state hint. Defaults to the kit string catalogue.
readOnlybooleanfalseBlocks edits and hides interactive toolbar controls.
minHeightstring-CSS length applied to --df-editor-min-height for this instance.
toolbar"static" | "floating" | "both" | "none""both"static pins a format bar above the surface. floating shows a selection toolbar. both enables both. none hides kit chrome.
autoFocusbooleanfalseFocus the editable surface on mount.
aria-labelstring-Accessible name for the editable surface. Defaults to the kit string catalogue. Override when the host already names the field with a visible Label.
classNamestring-Additional styles on the root.

Accessibility

Editable name: The contenteditable surface uses aria-label (catalogue default, or your override). Format toolbars use catalogue labels for icon-only controls. Prefer a visible Label with htmlFor only when you wrap a separate form control; this surface is not a native input.