Blazor

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class RichTextEditorEvents

    Show / Hide Table of Contents

    Class RichTextEditorEvents

    A class used for configuring the SfRichTextEditor component events.

    Inheritance
    System.Object
    RichTextEditorEvents
    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>

    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>

    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>
    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>

    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>

    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>

    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>

    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>

    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>
    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>
    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>

    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>

    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>
    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>

    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>

    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>

    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>

    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>

    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>
    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>

    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>
    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>
    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>
    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>
    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>
    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>

    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>

    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>
    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>

    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>

    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>
    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>

    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>

    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>

    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>
    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.

    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved