Function htmlToSvg

  • Embeds an HTML string into a svg tag and converts to svg string or svg as data url

    Parameters

    • html: string

      HTML string

    • style: string

      CSS string

    • __namedParameters: {
          height: number;
          width: number;
      }
      • height: number
      • width: number
    • toDataUrl: boolean = true

      if true, returns a data url, otherwise returns the svg string

    Returns string

    svg string or svg as data url