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.RedoAsync(CancellationToken) Method

Reapplies the last action.

Namespace: DevExpress.Blazor.RichEdit

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

NuGet Package: DevExpress.Blazor.RichEdit

#Declaration

C#
public ValueTask<bool> RedoAsync(
    CancellationToken cancellationToken = default(CancellationToken)
)

#Optional Parameters

Name Type Default Description
cancellationToken CancellationToken null

An object that propagates a cancellation notification.

#Returns

Type Description
ValueTask<Boolean>

A structure that stores an awaitable result of an asynchronous operation.

#Remarks

The Rich Text editor keeps track of user actions. Click the Redo button to repeat the actions. You can also use the RedoAsync method to redo the last action from code.

The code snippet below adds new text to the documents, and undoes and redoes this operation:

Razor
<DxRichEdit @ref=rich />

@code {
    DxRichEdit rich;
    async Task ModifyDocumentContent() {
        Document documentApi = rich.DocumentAPI;
        documentApi.BeginUpdate();
        Paragraph body = await documentApi.Paragraphs.CreateAsync(0);
        TextSpan text = await documentApi.AddTextAsync(0, "New text");
        documentApi.EndUpdate();
        await rich.UndoAsync();
        await rich.RedoAsync();
    }
    @* ... *@
}
See Also