Public function

Export the given shapes as files.

Signature
function exportAs(
  editor: Editor,
  ids: TLShapeId[],
  format?: TLExportType,
  opts?: Partial<TLSvgOptions>
): Promise<void>
Parameters
NameDescription

editor

Editor

The editor instance.

ids

TLShapeId[]

The ids of the shapes to export.

format

TLExportType

The format to export as.

opts

Partial<TLSvgOptions>

Options for the export.

Returns
Promise<void>
References

Editor, TLShapeId, TLSvgOptions

Source

packages/tldraw/src/lib/utils/export/exportAs.ts

EventsProviderPropsfindMenuItem