Class RichTextEditorEvents
A class used for configuring the SfRichTextEditor component events.
Inheritance
Namespace: Syncfusion.Blazor.RichTextEditor
Assembly: Syncfusion.Blazor.dll
Syntax
public class RichTextEditorEvents : ComponentBase
Constructors
RichTextEditorEvents()
Declaration
public RichTextEditorEvents()
Properties
AfterPasteCleanup
Gets or sets the event callback that will be invoked after pasted the copied content into the editor.
Declaration
public EventCallback<PasteCleanupArgs> AfterPasteCleanup { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<PasteCleanupArgs> | An event callback function. |
BeforePasteCleanup
Gets or sets the event callback that will be invoked before pasting the copied content into the editor.
Declaration
public EventCallback<PasteCleanupArgs> BeforePasteCleanup { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<PasteCleanupArgs> | An event callback function. |
BeforeUploadImage
Gets or sets the event callback that will be invoked when the selected image begins to upload to the server.
Declaration
public EventCallback<ImageUploadingEventArgs> BeforeUploadImage { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ImageUploadingEventArgs> | An event callback function. |
Remarks
You can pass the custom parameters with key and value pair format using CustomFormData on XHR's current request for image upload action.
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorEvents BeforeUploadImage="OnImageUploading"/>
</SfRichTextEditor>
@code {
public void OnImageUploading(ImageUploadingEventArgs args) {
// adding custom Form Data
args.CustomFormData = new List<object> {new { path = "Your path"}};
}
}
Blur
Gets or sets the event callback that will be invoked when the SfRichTextEditor loses focus.
Declaration
public EventCallback<BlurEventArgs> Blur { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BlurEventArgs> | An event callback function. |
Created
Gets or sets the event callback that will be invoked when the SfRichTextEditor gets rendered.
Declaration
public EventCallback<object> Created { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<System.Object> | An event callback function. |
Destroyed
Gets or sets the event callback that will be invoked when the SfRichTextEditor gets destroyed.
Declaration
public EventCallback<DestroyedEventArgs> Destroyed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<DestroyedEventArgs> | An event callback function. |
DialogClosed
Gets or sets the event callback that will be invoked when the SfRichTextEditor dialog after closed.
Declaration
public EventCallback<DialogCloseEventArgs> DialogClosed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<DialogCloseEventArgs> | An event callback function. |
DialogOpened
Gets or sets the event callback that will be invoked when the SfRichTextEditor dialog after opened.
Declaration
public EventCallback<DialogOpenEventArgs> DialogOpened { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<DialogOpenEventArgs> | An event callback function. |
FileRemoving
Gets or sets the event callback that will be invoked when the selected media is remove from the upload location.
Declaration
public EventCallback<RemovingEventArgs> FileRemoving { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RemovingEventArgs> | An event callback function. |
Remarks
You can pass the custom parameters with key and value pair format using CustomFormData on XHR's current request for media removing action.
Examples
@using Syncfusion.Blazor.RichTextEditor;
@using Syncfusion.Blazor.Inputs
<SfRichTextEditor>
<RichTextEditorEvents FileRemoving="FileRemoveHandler" />
</SfRichTextEditor>
@code {
public void FileRemoveHandler(RemovingEventArgs args) {
// adding custom Form Data
args.CustomFormData = new List<object> {new { path = "Your path"}};
}
}
FileSelected
Gets or sets the event callback that will be invoked when the media is selected or dragged into the insert media dialog.
Declaration
public EventCallback<SelectedEventArgs> FileSelected { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<SelectedEventArgs> | An event callback function. |
Remarks
You can prevent the media selection action using Cancel.
Examples
@using Syncfusion.Blazor.RichTextEditor;
@using Syncfusion.Blazor.Inputs
<SfRichTextEditor>
<RichTextEditorEvents FileSelected="FileSelectionHandler" />
</SfRichTextEditor>
@code {
public void FileSelectionHandler(SelectedEventArgs args) {
args.Cancel = true;
}
}
FileUploadChange
Gets or sets the event callback that will be invoked when the media is successfully uploaded and inserted into editor content.
Declaration
public EventCallback<FileUploadChangeEventArgs> FileUploadChange { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<FileUploadChangeEventArgs> | An event callback function. |
FileUploadFailed
Gets or sets the event callback that will be invoked when the media upload process gets failed.
Declaration
public EventCallback<FileUploadFailedEventArgs> FileUploadFailed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<FileUploadFailedEventArgs> | An event callback function. |
FileUploading
Gets or sets the event callback that will be invoked when the selected media begins to upload to the server.
Declaration
public EventCallback<FileUploadingEventArgs> FileUploading { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<FileUploadingEventArgs> | An event callback function. |
Remarks
You can pass the custom parameters with key and value pair format using CustomFormData on XHR's current request for media upload action.
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorEvents FileUploading="OnMediaUploading"/>
</SfRichTextEditor>
@code {
public void OnMediaUploading(FileUploadingEventArgs args) {
// adding custom Form Data
args.CustomFormData = new List<object> {new { path = "Your path"}};
}
}
FileUploadSuccess
Gets or sets the event callback that will be invoked when the media is successfully uploaded.
Declaration
public EventCallback<FileUploadSuccessEventArgs> FileUploadSuccess { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<FileUploadSuccessEventArgs> | An event callback function. |
Focus
Gets or sets the event callback that will be invoked when the SfRichTextEditor is focus.
Declaration
public EventCallback<FocusEventArgs> Focus { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<FocusEventArgs> | An event callback function. |
ImageDelete
Gets or sets the event callback that will be invoked when the selected image is deleted from the editor content.
Declaration
public EventCallback<AfterImageDeleteEventArgs> ImageDelete { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<AfterImageDeleteEventArgs> | An event callback function. |
ImageUploadChange
Gets or sets the event callback that will be invoked when the image is successfully uploaded and inserted into editor content.
Declaration
public EventCallback<ImageUploadChangeEventArgs> ImageUploadChange { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ImageUploadChangeEventArgs> | An event callback function. |
MediaDeleted
Gets or sets the event callback that will be invoked when the selected media is deleted from the editor content.
Declaration
public EventCallback<MediaDeletedEventArgs> MediaDeleted { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<MediaDeletedEventArgs> | An event callback function. |
OnActionBegin
Gets or sets the event callback that will be invoked before executing the commands using the toolbar items click or Syncfusion.Blazor.RichTextEditor.SfRichTextEditor.ExecuteCommand(Syncfusion.Blazor.RichTextEditor.CommandName)method call.
Declaration
public EventCallback<ActionBeginEventArgs> OnActionBegin { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ActionBeginEventArgs> | An event callback function. |
Remarks
You can prevent the current executing action using Cancel.
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorEvents OnActionBegin="ActionBeginHandler" />
</SfRichTextEditor>
@code {
public void ActionBeginHandler(ActionBeginEventArgs args) {
args.Cancel = true;
}
}
OnActionComplete
Gets or sets the event callback that will be invoked after executing the commands using the toolbar items click or Syncfusion.Blazor.RichTextEditor.SfRichTextEditor.ExecuteCommand(Syncfusion.Blazor.RichTextEditor.CommandName)method call.
Declaration
public EventCallback<ActionCompleteEventArgs> OnActionComplete { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ActionCompleteEventArgs> | An event callback function. |
OnDialogClose
Gets or sets the event callback that will be invoked before editor dialog close.
Declaration
public EventCallback<BeforeCloseEventArgs> OnDialogClose { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BeforeCloseEventArgs> | An event callback function. |
Remarks
You can prevent the dialog close action using Cancel.
Examples
@using Syncfusion.Blazor.RichTextEditor;
@using Syncfusion.Blazor.Popups
<SfRichTextEditor>
<RichTextEditorEvents OnDialogClose="DialogCloseHandler" />
</SfRichTextEditor>
@code {
public void DialogCloseHandler(BeforeCloseEventArgs args) {
args.Cancel = true;
}
}
OnDialogOpen
Gets or sets the event callback that will be invoked before the editor dialog is opened.
Declaration
public EventCallback<BeforeOpenEventArgs> OnDialogOpen { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BeforeOpenEventArgs> | An event callback function. |
Remarks
You can prevent the dialog open action using Cancel.
OnImageDrop
Gets or sets the event callback that will be invoked when the image is being dropped in editor content.
Declaration
public EventCallback<BeforeImageDropEventArgs> OnImageDrop { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BeforeImageDropEventArgs> | An event callback function. |
Remarks
You can prevent the image drag and drop action using Cancel.
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorEvents OnImageDrop="ImageDragHandler" />
</SfRichTextEditor>
@code {
public void ImageDragHandler(BeforeImageDropEventArgs args) {
args.Cancel = true;
}
}
OnImageRemoving
Gets or sets the event callback that will be invoked when the selected image is remove from the upload location.
Declaration
public EventCallback<RemovingEventArgs> OnImageRemoving { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<RemovingEventArgs> | An event callback function. |
Remarks
You can pass the custom parameters with key and value pair format using CustomFormData on XHR's current request for image removing action.
Examples
@using Syncfusion.Blazor.RichTextEditor;
@using Syncfusion.Blazor.Inputs
<SfRichTextEditor>
<RichTextEditorEvents OnImageRemoving="FileRemoveHandler" />
</SfRichTextEditor>
@code {
public void FileRemoveHandler(RemovingEventArgs args) {
// adding custom Form Data
args.CustomFormData = new List<object> {new { path = "Your path"}};
}
}
OnImageSelected
Gets or sets the event callback that will be invoked when the image is selected or dragged into the insert image dialog.
Declaration
public EventCallback<SelectedEventArgs> OnImageSelected { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<SelectedEventArgs> | An event callback function. |
Remarks
You can prevent the image selection action using Cancel.
Examples
@using Syncfusion.Blazor.RichTextEditor;
@using Syncfusion.Blazor.Inputs
<SfRichTextEditor>
<RichTextEditorEvents OnImageSelected="ImageSelectionHandler" />
</SfRichTextEditor>
@code {
public void ImageSelectionHandler(SelectedEventArgs args) {
args.Cancel = true;
}
}
OnImageUploadFailed
Gets or sets the event callback that will be invoked when the image upload process gets failed.
Declaration
public EventCallback<ImageFailedEventArgs> OnImageUploadFailed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ImageFailedEventArgs> | An event callback function. |
OnImageUploadSuccess
Gets or sets the event callback that will be invoked when the image is successfully uploaded.
Declaration
public EventCallback<ImageSuccessEventArgs> OnImageUploadSuccess { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ImageSuccessEventArgs> | An event callback function. |
OnQuickToolbarOpen
Gets or sets the event callback that will be invoked before the quick toolbar is opened.
Declaration
public EventCallback<BeforeQuickToolbarOpenArgs> OnQuickToolbarOpen { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<BeforeQuickToolbarOpenArgs> | An event callback function. |
Remarks
You can prevent the quick toolbar open action using Cancel.
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorEvents OnQuickToolbarOpen="QuickToobarHandler" />
</SfRichTextEditor>
@code {
public void QuickToobarHandler(BeforeQuickToolbarOpenArgs args) {
args.Cancel = true;
}
}
OnResizeStart
Gets or sets the event callback that will be invoked when you start resizing the image.
Declaration
public EventCallback<ResizeArgs> OnResizeStart { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ResizeArgs> | An event callback function. |
OnResizeStop
Gets or sets the event callback that will be invoked when you stop resizing the image.
Declaration
public EventCallback<ResizeArgs> OnResizeStop { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ResizeArgs> | An event callback function. |
OnToolbarClick
Gets or set the event callback that will be invoked when the toolbar items are clicked.
Declaration
public EventCallback<ToolbarClickEventArgs> OnToolbarClick { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ToolbarClickEventArgs> | An event callback function. |
Remarks
You can prevent the quick toolbar item click action using Cancel.
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorEvents OnToolbarClick="ToobarHandler" />
</SfRichTextEditor>
@code {
public void ToobarHandler(ToolbarClickEventArgs args) {
args.Cancel = true;
}
}
QuickToolbarClosed
Gets or sets the event callback that will be invoked after the quick toolbar has been closed.
Declaration
public EventCallback<QuickToolbarEventArgs> QuickToolbarClosed { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<QuickToolbarEventArgs> | An event callback function. |
QuickToolbarOpened
Gets or sets the event callback that will be invoked after the quick toolbar is opened.
Declaration
public EventCallback<QuickToolbarEventArgs> QuickToolbarOpened { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<QuickToolbarEventArgs> | An event callback function. |
UpdatedToolbarStatus
Gets or sets the event callback that will be invoked when the toolbar items status is updated.
Declaration
public EventCallback<ToolbarStatusEventArgs> UpdatedToolbarStatus { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ToolbarStatusEventArgs> | An event callback function. |
ValueChange
Gets or sets the event callback that will be invoked when the editor content gets changed on every SaveInterval time or when the editor loses focus.
Declaration
public EventCallback<ChangeEventArgs> ValueChange { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.EventCallback<ChangeEventArgs> | An event callback function. |
Examples
@using Syncfusion.Blazor.RichTextEditor;
<SfRichTextEditor>
<RichTextEditorEvents ValueChange="OnValueChange"/>
</SfRichTextEditor>
@code {
public void OnValueChange(Syncfusion.Blazor.RichTextEditor.ChangeEventArgs args) {
// Get Rich Text Editor updated value.
var RTEValue = args.Value;
}
}
Methods
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing any asynchronous operation. |