Blazorise RichTextEdit: API Reference

Explore the Blazorise RichTextEdit API reference for editor parameters, toolbar components, events, 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

ParameterDefaultType
AriaDescribedBy—string

Specifies the aria-describedby attribute value.
When set, this value is rendered as-is and overrides help and validation message ids generated by Field and Validation.
AriaInvalid—string

Specifies the aria-invalid attribute value.
When set, this value is rendered as-is and overrides the validation-derived aria-invalid state.
AriaLabelledBy—string

Specifies the aria-labelledby attribute value.
When set, this value is rendered as-is. Some non-labelable controls can otherwise derive it automatically from a parent FieldLabel or FieldsLabel.
AriaRequiredfalsebool

Specifies the aria-required attribute value.
When set, this value overrides the required-field state resolved from the parent Validation.
Autofocusfalsebool

Set's the focus to the component after the rendering is done.
ChildContentnullRenderFragment

Specifies the content to be rendered inside this RichTextEdit.
ConfigureQuillJsMethod—string

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

Add the disabled boolean attribute on an input to prevent user interactions and make it appear lighter.
EditornullRenderFragment

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

Placeholder for validation messages.
OnScreenKeyboardfalsebool

Enables the on-screen keyboard for this input component. When not explicitly set, the global accessibility option is used.
When omitted, uses the global accessibility setting and enabled input types.
OnScreenKeyboardEnterKeyBehaviorInput-dependentOnScreenKeyboardEnterKeyBehavior

Specifies how the on-screen keyboard enter key should behave for this input component.
Possible values:DefaultNewLineSubmitHideKeyDown
When omitted, uses the cascading override, then the global option, then the input component's behavior.
OnScreenKeyboardLayoutInput-dependentOnScreenKeyboardLayout

Specifies the on-screen keyboard layout for this input component. When not explicitly set, the global accessibility option is used.
Possible values:TextNumericDecimalEmailUrlTelephone
When omitted, uses the global default layout, then the input component's layout.
OnScreenKeyboardShowModeFocusOnScreenKeyboardShowMode

Gets or sets how the on-screen keyboard is shown for this input.
Possible values:DefaultFocusManual
When omitted, uses the global show mode; Default resolves to Focus.
PlaceHolder—string

Place holder text visible in empty editor.
ReadOnlyfalsebool

Add the readonly boolean attribute on an input to prevent modification of the input’s value.
SanitizedPasteOptionsnullRichTextEditSanitizedPasteOptions

Options used to configure sanitized paste functionality.
When this parameter is explicitly defined, it has priority over globally configured SanitizedPasteOptions.
SizeDefaultSize?

Sets the size of the input control.
When omitted, uses the parent Addons size, then the theme input size, then Size.Default.
SubmitOnEnterfalsebool

Call EnterPressed event when user presses the ENTER key.
TabIndexnullint?

If defined, indicates that its element can be focused and can participates in sequential keyboard navigation.
ThemeSnowRichTextEditTheme

The theme (Snow or Bubble) of the editor.
Possible values:SnowBubble
ToolbarnullRenderFragment

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

Toolbar placed on the top or bottom of the editor.
Possible values:TopBottomStartEnd
UseResizefalsebool

Indicates whether resizing functionality should be enabled.
When this parameter is explicitly defined, it has priority over globally configured UseResize.
UseSanitizedPastefalsebool

Indicates whether sanitized paste functionality should be enabled.
When this parameter is explicitly defined, it has priority over globally configured UseSanitizedPaste.
UseTablesfalsebool

Indicates whether table functionality should be enabled.
When this parameter is explicitly defined, it has priority over globally configured UseTables.
ValuenullTValue

Specifies the value inside the input field.
ValueExpressionnullExpression<Func<TValue>>

Specifies an expression that identifies the input value.

RichTextEditToolbarGroup

ParameterDefaultType
ChildContentnullRenderFragment

Defines the child content.

RichTextEditToolbarButton

ParameterDefaultType
ActionnullRichTextEditAction?

Specifies the toolbar action.
Value—string

Specifies the value corresponding to the action.

RichTextEditToolbarSelect

ParameterDefaultType
ActionnullRichTextEditAction?

Specifies the select action.
ChildContentnullRenderFragment

Defines the child content.

Events

RichTextEdit

EventType
BlurEventCallback<FocusEventArgs>

The blur event fires when an element has lost focus.
ContentChangedEventCallback

Notifies when the content within the editor changes.
CustomValidationValueFunc<TValue>

Used to provide custom validation value on which the validation will be processed with the Validator handler.
Should be used carefully as it's only meant for some special cases when input is used in a wrapper component, like Autocomplete or SelectList.
EditorBlurEventCallback

Notifies when the editor loses focus.
EditorFocusEventCallback

Notifies when the editor gains focus.
EnterPressedEventCallback

Notifies when the enter key is pressed within the editor.
This event is triggered only when SubmitOnEnter is enabled.
FocusInEventCallback<FocusEventArgs>

Notifies when the input box gains focus.
FocusOutEventCallback<FocusEventArgs>

Notifies when the input box loses focus.
KeyDownEventCallback<KeyboardEventArgs>

Notifies when a key is pressed down while the control has focus.
KeyPressEventCallback<KeyboardEventArgs>

Notifies when a key is pressed while the control has focus.
KeyUpEventCallback<KeyboardEventArgs>

Notifies when a key is released while the control has focus.
OnFocusEventCallback<FocusEventArgs>

Notifies when the input box gains or loses focus.
ValueChangedEventCallback<TValue>

Occurs after value has changed.

Methods

RichTextEdit

MethodReturnParameters
ClearAsyncValueTask—

Clears the editor content asynchronously.
GetDeltaAsyncValueTask<string>—

Gets the editor content as a Quill Delta JSON asynchronously.
GetHtmlAsyncValueTask<string>RichTextEditHtmlOptions htmlOptions

Gets the editor content as HTML asynchronously.
GetTextAsyncValueTask<string>—

Gets the editor content as plain text asynchronously.
SetDeltaAsyncValueTaskstring deltaJson

Sets the editor content as a Quill Delta JSON asynchronously.
The Quill Delta format is a rich text format used by the Quill editor. See the official Quill.js documentation for more details.
SetHtmlAsyncValueTaskstring html

Sets the editor content as HTML asynchronously.
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.
SetTextAsyncValueTaskstring text

Sets the editor content as plain text asynchronously.
ShowOnScreenKeyboardTaskbool focus

Shows the on-screen keyboard for this input.
FocusTaskbool scrollToElement

Sets the focus on the underline element.
RevalidateTask—

Forces the Validation (if any is used) to re-validate with the new custom or internal value.