Skip to main content

DxRichEdit.DocumentContentChanging Event

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

[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