Skip to main content
A newer version of this page is available. .

DxRichEdit.DocumentContentChanging Event

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

Namespace: DevExpress.Blazor.RichEdit

Assembly: DevExpress.Blazor.RichEdit.v22.1.dll

NuGet Package: DevExpress.Blazor.RichEdit

Declaration

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

<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