textmode.export.js / TextmodeExportAPI / toSVG
Method: toSVG()
ts
toSVG(options?): string;Generates SVG markup for the selected layer.
Parameters
| Parameter | Type | Description |
|---|---|---|
options? | SVGExportOptions | Export options. |
Returns
string
The SVG content representing the artwork.
Example
ts
const svg = t.toSVG({ layer: t.layers.base, drawMode: 'stroke', strokeWidth: 1.5 });