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:
A user selects the File → Save ribbon command.
A user presses Ctrl+S.
You call the SaveDocumentAsync(CancellationToken) method.
An auto-save timeout expires.
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;
}
}