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.

Editing tools

Typing options, find and replace, table tools, image upload, auto-saved drafts and the status bar.

Editing

Tune typing: Placeholder, SpellCheck, IndentUnit, AutoPair (wrap a selection in a typed *, `, […), AutoClosePairs (close ( [ { ` " as typed) and ChangeDebounceTime (throttle the value sent to .NET). TabIndents off lets Tab leave; either way Escape then Tab always does, so the editor never traps the keyboard.

Edit 0 words 0 chars


BoldStyle, ItalicStyle and BulletStyle pick the markdown spelling the commands write, and TableColumns / TableRows size the inserted table. ReadOnly keeps the text selectable and searchable; Disabled disables the whole editor.

Edit 13 words 67 chars


Read-only

The content of this editor cannot be edited, but can still be selected and the preview stays live.

Split 20 words 116 chars


Disabled

Split 2 words 10 chars

Find & replace

The magnifier or Ctrl+F opens the panel, seeded with the selection: Enter / Shift+Enter walk the matches, Enter in the replace box replaces (Ctrl+Enter replaces all), Aa matches case, and the count is announced. FindNext, FindPrevious and Replace do the same from code.



Edit 27 words 159 chars

Table tools

The table menu edits the table at the caret - rows, columns, column alignment - and re-pads every column so the source stays aligned. Tab / Shift+Tab walk the cells and add a row past the last one. Each tool is a command, so Run reaches it too.


PackageDownloadsNotes
Core1.2Mships the components
Extras480Kships this editor
Split 32 words 154 chars

Image upload

OnImageUpload turns on image paste, drop and the toolbar's upload button (the keyboard's way to a file): a placeholder goes in at once and the returned URL replaces it (null cancels). AcceptedImageTypes and MaxImageSize refuse a file before it is read, reported through OnImageRejected. Pasted HTML or spreadsheet tables become markdown tables, and a URL pasted over a selection becomes a link.


Image upload

Paste an image, drop one anywhere on this editor, or pick one with the upload button of the toolbar.

Split 22 words 115 chars

Auto save

AutoSaveId keeps a draft in localStorage and restores it when no value is given; OnDraftRestored says when it did. Type, reload the page, and call ClearDraft once the content is saved for real.




Nothing to preview yet.
Split 0 words 0 chars

Status bar

Words (each CJK character counts as one) and characters (an emoji counts as one) by default. ShowReadingTime adds an estimate at WordsPerMinute, ShowCursorPosition the line, column and selection, and MaxLength caps the text and turns the counter into "used / allowed" - read out with the textarea and highlighted at the limit.

EditLn 1, Col 1 13 words 77 / 280 chars1 min read

Feedback

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