getSvgAsImage

See source code
function getSvgAsImage(
  editor: Editor,
  svgString: string,
  options: {
    height: number
    pixelRatio?: number
    quality?: number
    type: 'jpeg' | 'png' | 'webp'
    width: number
  }
): Promise<Blob | null>

Parameters

NameDescription

editor

svgString

string

options

{
  height: number
  pixelRatio?: number
  quality?: number
  type: 'jpeg' | 'png' | 'webp'
  width: number
}

Returns

Promise<Blob | null>
Prev
getOccludedChildren
Next
parseTldrawJsonFile