Skip to content

textmode.export.js / TextmodeExportAPI

Interface: TextmodeExportAPI

Runtime export helpers that createExportPlugin attaches to the Textmodifier instance.

Properties

PropertyTypeDescription
exportOverlayExportOverlayControllerController for managing the export overlay UI visibility at runtime.

Methods

saveCanvas()

ts
saveCanvas(options?): Promise<void>;

Saves the current canvas content to an image file ('png' by default).

Parameters

ParameterTypeDescription
options?ImageExportOptionsExport options.

Returns

Promise<void>


copyCanvas()

ts
copyCanvas(options?): Promise<void>;

Copies the current canvas to the user's clipboard as an image.

Parameters

ParameterTypeDescription
options?ImageExportOptionsExport options.

Returns

Promise<void>


saveSVG()

ts
saveSVG(options?): void;

Downloads the current frame as an SVG file.

Parameters

ParameterTypeDescription
options?SVGExportOptionsExport options.

Returns

void


saveStrings()

ts
saveStrings(options?): void;

Downloads the current text content as a plain-text file.

Parameters

ParameterTypeDescription
options?TXTExportOptionsExport options.

Returns

void


toSVG()

ts
toSVG(options?): string;

Generates the SVG markup for the current frame.

Parameters

ParameterTypeDescription
options?SVGExportOptionsExport options.

Returns

string

The SVG content representing the artwork.


toString()

ts
toString(options?): string;

Produces the current text content as a string.

Parameters

ParameterTypeDescription
options?TXTExportOptionsExport options.

Returns

string

The textual representation of the artwork.


saveGIF()

ts
saveGIF(options?): Promise<void>;

Records an animated GIF and saves it to disk.

Parameters

ParameterTypeDescription
options?GIFExportOptionsExport options.

Returns

Promise<void>


saveWEBM()

ts
saveWEBM(options?): Promise<void>;

Captures a WEBM video and saves it to disk.

Parameters

ParameterTypeDescription
options?VideoExportOptionsExport options.

Returns

Promise<void>