Member Junction
    Preparing search index...
    • Shows untrusted SVG markup in host: it is run through sanitize first (required; use MarkdownService.SanitizeHtml in Angular hosts), then mounted interactively when it carries the MJ Diagram contract (data-mj-diagram="1"), or shown as a static SVG otherwise. Returns the viewer, or null when the markup is not an MJ diagram.

      Sanitizing keeps <style>, so the SVG is placed in a shadow root, where its CSS cannot select anything on the page, and host gets paint containment, so position: fixed or :host rules cannot draw outside it.

      Parameters

      • host: HTMLElement
      • svgMarkup: string
      • sanitize: (rawSvg: string) => string

      Returns DiagramViewerInstance