Trilium Backend API
    Preparing search index...
    • Gets an HTML content string from the first selected element.

      Type Parameters

      Parameters

      Returns string

      The HTML content string.

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

      $('#fruits').html('<li class="mango">Mango</li>').html();
      //=> <li class="mango">Mango</li>
    • Replaces each selected element's content with the specified content.

      Type Parameters

      Parameters

      • this: Cheerio<T>
      • str: string | Cheerio<T>

        The content to replace selection's contents with.

      Returns Cheerio<T>

      The instance itself.

      $('.orange').html('<li class="mango">Mango</li>').html();
      //=> <li class="mango">Mango</li>