Blazor Markdown Editor Example - Custom Format
This sample demonstrates how to customize markdown formatting tags in the Rich Text Editor by overriding the editor’s default syntax mappings. Type or edit the text and apply formatting to preview the customized markdown output — for example, using + as the marker for unordered lists — and observe how toolbar actions and keyboard input generate the configured markdown tokens.
The editor exposes a dedicated options class for markdown customization. Configure mapping for list markers, inline and block format tokens, and selection wrappers so generated markdown matches project or platform conventions. The sample shows practical overrides and immediate visual feedback so you can validate the resulting markdown before exporting or persisting content.
Key properties illustrated in the sample:
- ListSyntax — customize unordered/ordered list markers and indentation tokens.
- FormatSyntax — override bold, italic, code, and heading tokens.
- SelectionSyntax — define wrappers applied when text selections are formatted.
Implementation notes: test formatting interactions, confirm toolbar and keyboard behaviors produce the expected markdown, and verify exported content in target consumers. This approach enables consistent markdown authoring that conforms to organizational style guides or third‑party platform requirements.
For complete API details and examples, see RichTextEditorMarkdownOptions.