MAIDR JavaScript API
    Preparing search index...
    • Makes every Graphviz drawing under a root accessible, or one drawing when the root is itself one.

      A drawing already carrying a maidr attribute is left alone, so calling this again after more drawings arrive binds only the new ones. A drawing that cannot be converted is reported on the console and left as drawn, and the rest are still made accessible.

      Parameters

      • root: ParentNode | SVGSVGElement = document

        The drawing, or where to look for drawings. Defaults to the document

      • options: GraphvizAdapterOptions = {}

        Figure options, applied to each drawing. An id is used only when the root is a single drawing, since two figures cannot share it

      Returns Maidr[]

      The figures made, one per drawing that converted

      <!-- The SVG a Quarto {dot} cell, or `dot -Tsvg`, wrote into the page -->
      <svg>...</svg>
      <script src="https://cdn.jsdelivr.net/npm/maidr/dist/maidr.js"></script>
      <script src="https://cdn.jsdelivr.net/npm/maidr/dist/graphviz.js"></script>
      <script>maidrGraphviz.bindGraphviz();</script>