Paragraphs.CreateAsync(Int32, CancellationToken) Method
Inserts a paragraph mark at the specified position and creates a new paragraph.
Namespace: DevExpress.Blazor.RichEdit
Assembly: DevExpress.Blazor.RichEdit.v23.2.dll
NuGet Package: DevExpress.Blazor.RichEdit
Declaration
public ValueTask<Paragraph> CreateAsync(
int position,
CancellationToken cancellationToken = default(CancellationToken)
)
Parameters
Name | Type | Description |
---|---|---|
position | Int32 | The position where to insert the paragraph mark. |
Optional Parameters
Name | Type | Default | Description |
---|---|---|---|
cancellationToken | CancellationToken | null | An object that propagates a cancellation notification. |
Returns
Type | Description |
---|---|
ValueTask<Paragraph> | A structure that stores an awaitable result of an asynchronous operation. The awaitable result is a paragraph object. |
Remarks
The paragraph mark (¶) indicates the end of the new paragraph.
<DxRichEdit @ref="richEdit" CssClass="w-100 ch-720" />
@code {
DxRichEdit richEdit;
@* ... *@
Document documentAPI = richEdit.DocumentAPI;
@* ... *@
Paragraph bodyParagraph = await documentAPI.Paragraphs.CreateAsync(0);
@* ... *@
}
See Also