ComPDFKit Web SDK
    Preparing search index...

    Function overrideSearchExecution

    • Replaces the search started from the UI's search input with a custom function (per instance). Pass null to restore the default.

      Parameters

      • fn: ((searchValue: string, options: Record<string, unknown>) => void) | null

        The search function, or null.

      Returns void

      instance.UI.overrideSearchExecution((searchValue, options) => {
      // Always search whole words
      instance.UI.searchTextFull(searchValue, { ...options, wholeWord: true }, false);
      });