RichTextEditor
CompleteA compact editor for formatted text inside a form: it has a Value like a text box, but the text can be bold, italic, a list, a link, a picture or a table. It reuses the engine of DocumentEditor, so the value can be HTML, Markdown, plain text, RTF, DOCX, ODT or DOC.
Example

Parameters
Formats
| Parameter | Type | Description |
|---|---|---|
Format | The Value is | |
Html | The HTML of the body (no page, no scripts). With SafeHtml the result also goes through MessageHtml.Sanitize, which keeps only the small tag set of MessageEditor. | |
Markdown | Markdown text. | |
Text | Plain text, one paragraph per line. | |
Rtf | The RTF source (7-bit text). | |
Docx, Odt, Doc | The file, Base64 encoded. Because it is rebuilt after each change, the value is raised after a longer pause (800 ms; set DebounceMilliseconds). |
API
| Parameter | Type | Description |
|---|---|---|
Class | string | Extra CSS classes added to the root element. |
DebounceMilliseconds | int? | Pause before ValueChanged is raised (default 200, 800 for Docx, Odt and Doc). |
Disabled | bool | Blocks editing and the toolbar. |
Fonts | IReadOnlyList<string> | The fonts offered in the font list of the full toolbar. |
Format | RichTextFormat | How Value is written: Html (default), Markdown, Text, Rtf, Docx, Odt or Doc. |
HelperText | string | Hint under the editor. |
Label | string | Visible label; also the accessible name of the text. |
MaxHeight | string | Height at which the writing area starts to scroll. |
MinHeight | string | Smallest height of the writing area as a CSS length (default 10rem). |
Placeholder | string | Shown while the text is empty. |
ReadOnly | bool | Shows the text without the toolbar and without editing. |
SafeHtml | bool | With Html, limits the value to the tags of MessageHtml.Sanitize. |
Style | string | Inline style added to the root element. |
Toolbar | RichTextToolbar | Full (default) or Compact. |
Value | string | The text in the chosen Format. Two-way. |
Events
API
| Event | Type | Description |
|---|---|---|
OnError | EventCallback<string> | Raised with the message when Value cannot be read in the chosen Format. |
ValueChanged | EventCallback<string> | Raised when the value changes. |
Package
RichTextEditor is part of RayCraft Complete. Package: RayCraft.Blazor.Complete. It comes from the private RayCraft feed and needs an active license. See Getting started.
Send feedbackVersion 1.0.3