Blazorise RichTextEdit: API Reference

Explore the API reference for the Blazorise RichTextEdit component, detailing available attributes and methods.

The RichTextEdit component in Blazorise is a rich text editor that provides a user-friendly interface for creating and editing formatted text content. It supports a variety of text formatting options such as bold, italic, underline, lists, links, and more. Additionally, the editor is extensible, allowing developers to enable and use advanced features like inserting tables, images, and even embedding custom HTML content.

API

Parameters

RichTextEdit

Parameter Description TypeDefault
ConfigureQuillJsMethod

[Optional] The javascript method to call to configure additional QuillJs modules and or add custom bindings.

string
Editor

[Optional] Gets or sets the content visible in the editor.

RenderFragmentnull
PlaceHolder

Place holder text visible in empty editor.

string
ReadOnly

Gets or sets a value indicating whether the editor is ReadOnly.

boolfalse
SubmitOnEnter

Call RichTextEdit.RichTextEdit.EnterPressed event when user presses the ENTER key.

boolfalse
Theme

The theme (Snow or Bubble) of the editor.

Possible values:Snow, Bubble

RichTextEditThemeRichTextEditTheme.Snow
Toolbar

[Optional] Gets or sets the content of the toolbar.

RenderFragmentnull
ToolbarPosition

Toolbar placed on the top or bottom of the editor.

Possible values:Top, Bottom, Start, End

PlacementTop

RichTextEditToolbarGroup

Parameter Description TypeDefault
ChildContent

Gets or sets the child content.

RenderFragmentnull

RichTextEditToolbarButton

Parameter Description TypeDefault
Action

Gets or sets the toolbar action.

RichTextEditAction?null
Value

Gets or sets the value corresponding to the action.

string

RichTextEditToolbarSelect

Parameter Description TypeDefault
Action

Gets or sets the select action.

RichTextEditAction?null
ChildContent

Gets or sets the child content.

RenderFragmentnull

Events

RichTextEdit

Event Description Type
ContentChanged

Occurs when the content within the editor changes.

EventCallback
EditorBlur

Occurs when the editor loses focus.

EventCallback
EditorFocus

Occurs when the editor gains focus.

EventCallback
EnterPressed

Occurs when the enter key is pressed within the editor.

Remarks

This event is triggered only when RichTextEdit.RichTextEdit.SubmitOnEnter is enabled.

EventCallback

Methods

RichTextEdit

Method DescriptionReturnParameters
SetHtmlAsync Sets the editor content as HTML asynchronously.
Remarks

Improper handling of HTML can lead to cross-site scripting (XSS). Ensure that the HTML content is properly sanitized before setting it in the editor.

ValueTaskstring html
GetHtmlAsync Gets the editor content as HTML asynchronously. ValueTask<string>
SetDeltaAsync Sets the editor content as a Quill Delta JSON asynchronously.
Remarks

The Quill Delta format is a rich text format used by the Quill editor. See the official Quill.js documentation for more details.

ValueTaskstring deltaJson
GetDeltaAsync Gets the editor content as a Quill Delta JSON asynchronously. ValueTask<string>
SetTextAsync Sets the editor content as plain text asynchronously. ValueTaskstring text
GetTextAsync Gets the editor content as plain text asynchronously. ValueTask<string>
ClearAsync Clears the editor content asynchronously. ValueTask
OnContentChanged Javascript callback for when content changes. Task
OnEnter Javascript callback for when enter is pressed. Task
OnEditorFocus Javascript callback for when editor get focus. Task
OnEditorBlur Javascript callback for when editor lost focus. Task
On this page