Prism API - v1.29.0
    Preparing search index...
    • Highlights the code inside a single element.

      The following hooks will be run:

      1. before-sanity-check
      2. before-highlight
      3. All hooks of Prism#highlight. These hooks will be run by an asynchronous worker if async is true.
      4. before-insert
      5. after-highlight
      6. complete

      Some the above hooks will be skipped if the element doesn’t contain any text or there is no grammar loaded for the element’s language.

      Parameters

      • this: Prism
      • element: Element

        The element containing the code. It must have a class of language-xxxx to be processed, where xxxx is a valid language identifier.

      • Optionaloptions: HighlightElementOptions = {}

      Returns void