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

docDocument

Required. The document to associate with the anchor

rowNumber

Required. The starting row position

columnNumber

Required. The starting column position

Events

    • Anchor.on("change", function(Object e))

    Fires whenever the anchor position changes.

    Fires whenever the anchor position changes.

    Events that can trigger this function include setPosition().

    Arguments

    eObject

    Required. An object containing information about the anchor position. It has two properties:

    • old: An object describing the old Anchor position

    • value: An object describing the new Anchor position

      Both of these objects have a row and column property corresponding to the position.

    Methods

      • Internal

    Clips the anchor position to the specified row and column.

    Clips the anchor position to the specified row and column.

    Arguments

    rowNumber

    Required. The row index to clip the anchor to

    columnNumber

    Required. The column index to clip the anchor to

      • 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

      rowNumber

      Required. The row index to move the anchor to

      columnNumber

      Required. The column index to move the anchor to

      noClipBoolean

      Required. Identifies if you want the position to be clipped