Skip to main content

canvasTemplate

function

Declare a ready-made canvas element, filled in and named, for the insert menu. A template carries no renderer of its own. It names an existing `tag` and the attributes to stamp out with it, so one element can ship several starting points, sized and positioned, grouped and ordered in the picker. Introducing a tag is canvasElement. Offering a variant of a tag is this.

function canvasTemplate(template: Omit<CanvasTemplate, 'kind'>): CanvasTemplate

Import

import { canvasTemplate } from '@modular/sdk';

Notes

category
Authoring