Trilium Backend API
    Preparing search index...
    • Get the combined text contents of each element in the set of matched elements, including their descendants.

      Type Parameters

      Parameters

      Returns string

      The text contents of the collection.

      $('.orange').text();
      //=> Orange

      $('ul').text();
      //=> Apple
      // Orange
      // Pear
    • Set the content of each element in the set of matched elements to the specified text.

      Type Parameters

      Parameters

      • this: Cheerio<T>
      • str: string | ((this: AnyNode, i: number, text: string) => string)

        The text to set as the content of each matched element.

      Returns Cheerio<T>

      The instance itself.

      $('.orange').text('Orange');
      //=> <div class="orange">Orange</div>