Ace API Reference
    Preparing search index...

    Class Search

    A class designed to handle all sorts of text searches within a [[Document Document]].

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    $options: Partial<Ace.SearchOptions>

    Methods

    • Parameters

      • needle: string
      • modifier: string

      Returns false | RegExp[]

    • Parameters

      • options: any

      Returns boolean

    • Parameters

      • session: EditSession
      • options: any

      Returns false | { forEach: (callback: any) => void }

    • Parameters

      • session: any
      • re: any
      • endIndex: any
      • start: any
      • first: any

      Returns { endCol: any; endRow: number; startCol: any; startRow: any }

    • Parameters

      • session: any
      • re: any
      • start: any
      • last: any

      Returns { endCol: any; endRow: number; startCol: any; startRow: number }

    • Searches for options.needle. If found, this method returns the [[Range Range]] where the text first occurs. If options.backwards is true, the search goes backwards in the session.

      Parameters

      • session: EditSession

        The session to search with

      Returns false | Range

    • Searches for all occurrances options.needle. If found, this method returns an array of [[Range Ranges]] where the text first occurs. If options.backwards is true, the search goes backwards in the session.

      Parameters

      • session: EditSession

        The session to search with

      Returns Range[]

    • Parameters

      • replaceString: any

      Returns any

    • Searches for options.needle in input, and, if found, replaces it with replacement.

      Parameters

      • input: string

        The text to search in

      • replacement: any

        The replacing text

        • (String): If options.regExp is true, this function returns input with the replacement already made. Otherwise, this function just returns replacement.
          If options.needle was not found, this function returns null.

      Returns string

    • Sets the search options via the options parameter.

      Parameters

      Returns void