RichTextEditor

This documentation provides a comprehensive reference for the RichTextEditor component, guiding you through its configuration options.
Demos

Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 1.0.0
AllowedImageDomains IEnumerable<string>? null Gets or sets the HTTPS domains permitted for uploaded-image URLs. Subdomains of configured domains are also permitted. 4.0.0
AllowedImageFileTypes IEnumerable<string>? null Gets or sets image file extensions accepted by the upload dialog. Null uses the built-in safe image types. 4.0.0
AllowedLinkDomains IEnumerable<string>? null Gets or sets the HTTP(S) domains permitted for inserted links. Subdomains of configured domains are also permitted. 4.0.0
AriaLabel string Rich text editor Gets or sets the accessible name announced for the editor by assistive technologies. 4.0.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 1.0.0
DebounceInterval int 300 Gets or sets the debounce delay, in milliseconds, before editor content changes are raised to ValueChanged. 4.0.0
Disabled bool False Gets or sets whether editing is disabled. When true, users cannot change content or invoke toolbar commands. 4.0.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 1.0.0
ImageUploadHandler RichTextEditorImageUploadDelegate? null Gets or sets the delegate that uploads a validated image and returns its HTTPS URL for insertion. 4.0.0
MaxImageFileSize long 5242880 Gets or sets the maximum accepted image-upload size in bytes. Larger files are rejected before upload. 4.0.0
MaxLength int? null Gets or sets the maximum plain-text character count. Null does not impose a character limit. 4.0.0
Placeholder string? null Gets or sets placeholder text displayed when the editor has no content. 4.0.0
ShowFooter bool True Gets or sets whether the footer displaying editor metrics is rendered. 4.0.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 1.0.0
ToolbarItems RichTextEditorToolbarItem[]? null Gets or sets the toolbar commands available to users. Null displays the complete built-in toolbar. 4.0.0
Value string null Gets or sets the editor HTML content bound to the component. 4.0.0
ValueExpression Expression<Func<string>>? null Gets or sets the expression that identifies the bound value for validation and EditContext notifications. 4.0.0

Methods #

Name Return type Description Added Version
ClearAsync() Task Clears the editor HTML content through the editor module. 4.0.0
FocusAsync() Task Moves keyboard focus to the editable area. 4.0.0
OnToolbarButtonClickAsync(string toolbarElementId, RichTextEditorToolbarItem item) Task Executes a command requested by a child toolbar button. 4.0.0

Events #

Name Return Type Description Added Version
StatusChanged EventCallback<string> Fires for transient editor activity and error status, such as image-upload progress or validation failures. 4.0.0
ValueChanged EventCallback<RichTextEditorChange> Fires after debounced editor content changes and supplies HTML, normalized text, and character metrics. 4.0.0

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.