DrylMarkdownEditor
AI-aware
A Markdown field with two views of one string: the source, with a formatting
toolbar, and the rendered preview. A switch in the header changes between them.
It binds and validates like DrylTextarea, and it is AI-native — one
aura frames the whole editor, and the preview shows a streamed draft arriving.
Editor and preview
Select text and press a toolbar button, or use Ctrl/Cmd+B, I, K and E. The same command takes the formatting off again. Enter continues a list, a task list or a quote; Tab is never captured. Every edit can be undone with Ctrl/Cmd+Z.
A bound view
@bind-View lets the host open the editor in the preview and follow or drive the switch.
The view is bound: the buttons above and the switch stay in step.
In a form
Inside an EditForm the editor validates like any other input: the message replaces the helper text and the frame takes the error color.
States
Disabled stops editing, not reading: the switch still opens the preview.
AI states
The Ai parameter frames the whole editor with the shared aura. While the state is Streaming, the preview shows the document arriving.
Nothing to preview
With DrylAiField
Wrapped in DrylAiField from the Agents package, an agent writes or rewrites the Markdown — the whole text, or only the selection — and the user accepts or discards the result.
Hover the editor and click ✨ — the simulated agent rewrites the draft and streams it into the source. Switch to the preview while it writes; accept it, or discard it with Esc.
Translated
Every word the editor renders of its own — switch, toolbar, empty preview — comes from MarkdownEditorTexts.