Skip to content

textmode.export.js / TextmodeExportAPI / toSVG

Method: toSVG()

ts
toSVG(options?): string;

Generates SVG markup for the selected layer.

Parameters

ParameterTypeDescription
options?SVGExportOptionsExport options.

Returns

string

The SVG content representing the artwork.

Example

ts
const svg = t.toSVG({ layer: t.layers.base, drawMode: 'stroke', strokeWidth: 1.5 });