Skip to content

Extras

MarkdownEditor

Bit.BlazorUI.ExtrasMdEditor

BitMarkdownEditor is a dependency-free markdown editor built on a plain textarea: a data-driven toolbar, keyboard shortcuts, smart list continuation, undo/redo, find & replace, table tools, image paste/drop/pick upload, autosaved drafts and EditForm validation, with a live GitHub-flavored preview rendered by the BitMarkdownViewer. Every command is a pure C# text transformation, and the toolbar, menus, panels and dialog follow the keyboard and ARIA patterns of their roles.

Toolbar, commands & preview

Building the toolbar from your own items, driving the editor from code, and replacing or tuning the preview.

Toolbar

Toolbar takes your own list of items: commands, dropdowns, separators and Custom items that receive the editor (AlwaysEnabled keeps one usable while read-only). An item draws an SVG Icon or a built-in IconName, may spell out a Text, and its Shortcut is bound and listed in the shortcuts panel. ShowToolbar and ShowStatusBar hide the chrome. The toolbar is one tab stop; arrow keys move between buttons and Enter, Space or Arrow Down opens a menu.

The toolbar of this editor only offers basic formatting, a custom clear button and a Save button bound to Ctrl+S.

Split 20 words 121 chars

Nothing to preview yet.

Commands

Drive the editor from code: Run applies any command to the selection, Insert adds markdown as one undo step, GetSelection / SetSelection read and move the caret, Undo / Redo follow CanUndo / CanRedo, and GetValue reads the live text.


Nothing to preview yet.
Split 0 words 0 chars

Result:

Preview

The preview uses the GitHub pipeline of the BitMarkdownViewer. PreviewPipeline swaps it, PreviewTemplate replaces the pane, and DebounceTime sets how long typing settles before it re-renders.

Basic pipeline (no tables, task lists, strikethrough or autolinks):

GitHub flavored extras like ~~strikethrough~~, https://bitplatform.dev autolinks,

  • [ ] task
  • [x] lists

| and | tables | | --- | ------ | | are | here |

Split 29 words 157 chars


PreviewTemplate rendering the raw source:

GitHub flavored extras like ~~strikethrough~~, https://bitplatform.dev autolinks,

- [ ] task
- [x] lists

| and | tables |
| --- | ------ |
| are | here   |
Split 29 words 157 chars

Feedback

Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.