Table of Contents

Class TextEditorSelectionEventArgs

Namespace
TwBlazor.Models
Assembly
TwBlazor.dll

Describes the selection in a TwTextEditor after it moved, passed to its OnSelectionChange callback.

[ExcludeFromCodeCoverage]
public sealed class TextEditorSelectionEventArgs
Inheritance
TextEditorSelectionEventArgs
Inherited Members

Constructors

TextEditorSelectionEventArgs()

public TextEditorSelectionEventArgs()

Properties

Formats

Gets the formats applied at the selection, such as Bold and Heading2.

public required IReadOnlySet<TextEditorFormat> Formats { get; init; }

Property Value

IReadOnlySet<TextEditorFormat>

Index

Gets where the selection starts, as a count of characters from the start of the text.

public required int Index { get; init; }

Property Value

int

Length

Gets how many characters are selected, or 0 when only the caret is placed.

public required int Length { get; init; }

Property Value

int

LinkUrl

Gets the address of the link the selection is in, or null when it is not in a link.

public string? LinkUrl { get; init; }

Property Value

string