Export the given shapes as files.

function exportAs(
  editor: Editor,
  ids: TLShapeId[],
  format: TLExportType | undefined,
  name: string | undefined,
  opts?: TLSvgOptions
): Promise<void>

Parameters

NameDescription

editor

The editor instance.

ids

The ids of the shapes to export.

format

TLExportType | undefined

The format to export as.

name

string | undefined

Name of the exported file. If undefined a predefined name, based on the selection, will be used.

opts

Options for the export.

Returns

Promise<void>
Prev
downsizeImage
Next
exportToBlob