Defines the floating pointer in the document. Whenever text is inserted or deleted before the cursor, the position of the cursor is updated

Constructors

Creates a new Anchor and associates it with a document. ...

Creates a new Anchor and associates it with a document.

   

Arguments

docDocumentRequired. The document to associate with the anchor
rowNumberRequired. The starting row position
columnNumberRequired. The starting column position

Events

    • Anchor.on("onChange", function(Event e))

Fires whenever the anchor position changes. Events that can trigger this function include 'includeText', `'insertL...

Fires whenever the anchor position changes. Events that can trigger this function include 'includeText', 'insertLines', 'removeText', and 'removeLines'.

   

Arguments

eEventRequired. Contains data about the event

Methods

    • Anchor.detach()

When called, the 'change' event listener is removed. ...

When called, the 'change' event listener is removed.

   

Returns the current document. ...

Returns the current document.

   

Returns an object identifying the row and column position of the current anchor. ...

Returns an object identifying the row and column position of the current anchor.

   

Sets the anchor position to the specified row and column. If noClip is true, the position is not clipped. ...

Sets the anchor position to the specified row and column. If noClip is true, the position is not clipped.

   

Arguments

rowNumberRequired. The row index to move the anchor to
columnNumberRequired. The column index to move the anchor to
noClipBooleanRequired. Identifies if you want the position to be clipped