Ace API Reference
    Preparing search index...

    Class Anchor

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

    Index

    Constructors

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

      Parameters

      • doc: Document

        The document to associate with the anchor

      • row: number | Ace.Point

        The starting row position

      • Optionalcolumn: number

        The starting column position

      Returns Anchor

    Properties

    $insertRight: boolean

    experimental: allows anchor to stick to the next on the left

    $onChange: any
    column: number
    document: Document

    @type{Document}

    row: any

    Methods

    • Clips the anchor position to the specified row and column.

      Parameters

      • row: number

        The row index to clip the anchor to

      • column: number

        The column index to clip the anchor to

      Returns Ace.Point

    • When called, the "change" event listener is appended.

      Parameters

      • doc: Document

        The document to associate with

      Returns void

    • When called, the "change" event listener is removed.

      Returns void

    • Returns the current document.

      Returns Document

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

      Parameters

      • row: number

        The row index to move the anchor to

      • column: number

        The column index to move the anchor to

      • OptionalnoClip: boolean

        Identifies if you want the position to be clipped

      Returns void