Wocart

@wocart/theme v4.1.0


@wocart/theme / index / insertInstance

Function: insertInstance()

insertInstance(theme, page, instance, placement?): DocumentEdit

Insert a new instance — from createInstance or instantiatePreset — at a placement, completed with its fixed and required blocks. Refused when the component is not insertable, not available on the document's surface, not placeable there, when the list is full or already holds the most of its type, when the document would pass its caps, or when any id is already in the document.

Parameters

theme

ThemeDefinition

page

PageData

instance

ComponentInstance

placement?

InstancePlacement

Returns

DocumentEdit