Back to Website
Show / Hide Table of Contents

Class SelectionHandler

Handler for performing simple operations with text selection.

Package: @aurigma/design-atoms-text
Remarks

the TextWhizz is used as a text engine.

Constructors

(constructor)(tw)

Constructs a new instance of the SelectionHandler class

Declaration
constructor(tw: ITextWhizzHolder);
Parameters
Type Name Description
ITextWhizzHolder tw

Properties

selectionChangeEvent

Text selection change event.

Declaration
get selectionChangeEvent(): EventObject<ITextRange | null>;
Property Value
Type Description
EventObject<ITextRange | null>

Text selection change event.

Remarks

reports the currently selected text.

Methods

getSelectionRange()

Declaration
getSelectionRange(): ITextRange;
Returns
Type Description
ITextRange

resetSelection(position)

Declaration
resetSelection(position?: IPositionInText): void;
Parameters
Type Name Description
IPositionInText position
Returns
Type Description
void

setSelectionByPoints(startPoint, endPoint)

Declaration
setSelectionByPoints(startPoint: IPoint, endPoint: IPoint): void;
Parameters
Type Name Description
IPoint startPoint
IPoint endPoint
Returns
Type Description
void

setSelectionByPositions(startPosition, endPosition)

Declaration
setSelectionByPositions(startPosition: IPositionInText, endPosition: IPositionInText): void;
Parameters
Type Name Description
IPositionInText startPosition
IPositionInText endPosition
Returns
Type Description
void

setSelectionByRange(selection)

Declaration
setSelectionByRange(selection: ITextRange): void;
Parameters
Type Name Description
ITextRange selection
Returns
Type Description
void

setSelectionToPosition(position)

Declaration
setSelectionToPosition(position: IPositionInText): void;
Parameters
Type Name Description
IPositionInText position
Returns
Type Description
void
Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2024 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback