RayCraftDocs
v1.0.3 raycraft.dev
On this page

RichTextEditor

Complete

A 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

RichTextEditor control

Parameters

Formats

ParameterTypeDescription
FormatThe Value is
HtmlThe 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.
MarkdownMarkdown text.
TextPlain text, one paragraph per line.
RtfThe RTF source (7-bit text).
Docx, Odt, DocThe file, Base64 encoded. Because it is rebuilt after each change, the value is raised after a longer pause (800 ms; set DebounceMilliseconds).

API

ParameterTypeDescription
ClassstringExtra CSS classes added to the root element.
DebounceMillisecondsint?Pause before ValueChanged is raised (default 200, 800 for Docx, Odt and Doc).
DisabledboolBlocks editing and the toolbar.
FontsIReadOnlyList<string>The fonts offered in the font list of the full toolbar.
FormatRichTextFormatHow Value is written: Html (default), Markdown, Text, Rtf, Docx, Odt or Doc.
HelperTextstringHint under the editor.
LabelstringVisible label; also the accessible name of the text.
MaxHeightstringHeight at which the writing area starts to scroll.
MinHeightstringSmallest height of the writing area as a CSS length (default 10rem).
PlaceholderstringShown while the text is empty.
ReadOnlyboolShows the text without the toolbar and without editing.
SafeHtmlboolWith Html, limits the value to the tags of MessageHtml.Sanitize.
StylestringInline style added to the root element.
ToolbarRichTextToolbarFull (default) or Compact.
ValuestringThe text in the chosen Format. Two-way.

Events

API

EventTypeDescription
OnErrorEventCallback<string>Raised with the message when Value cannot be read in the chosen Format.
ValueChangedEventCallback<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.