Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxRichEdit.DocumentContentChanging Event

In This Article

Allows you to notify users that the Rich Text Editor starts saving.

Namespace: DevExpress.Blazor.RichEdit

Assembly: DevExpress.Blazor.RichEdit.v24.2.dll

NuGet Package: DevExpress.Blazor.RichEdit

#Declaration

C#
[Parameter]
public EventCallback DocumentContentChanging { get; set; }

#Remarks

The Rich Text Editor updates the DocumentContent property value and raises the DocumentContentChanging and DocumentContentChanged events in the following cases:

The DocumentContentChanging event occurs before the DocumentContentChanged event. Handle the DocumentContentChanged event to save the document.

The following code example displays the DxPopup when the DocumentContentChanging event occurs:

Razor
<DxPopup @bind-Visible="@PopupVisible" HeaderText="Info" BodyText="The Rich Edit starts saving."/>

<DxRichEdit DocumentContentChanging="OnDocumentContentChanging" 
            DocumentFormat="DocumentFormat.OpenXml" 
            @bind-DocumentContent="@documentContent" />

@code {
    byte[] documentContent;
    bool PopupVisible { get; set; } = false;

    async Task OnDocumentContentChanging() {
        PopupVisible = true;        
    }    
}
See Also