Skip to main content
⚠️ Archived Version

You are viewing documentation for Design Editor version 7.2, which is no longer actively maintained. For the latest features and updates, please refer to the current version (7.3).

Interface: IStateSurface

A structure holding a state file name and a surface name or a surface index.

Example

let product = await editor.getProduct();

// Add the third page from the state file.
await product
.addSurface({
stateId: "3c040958-bfa8-4a3e-b3af-cff9257e7fa1",
surface: "2",
})
// If an error occurred while adding the page to the product.
.catch((error) =>
console.error("Adding surfaces failed with exception: ", error),
);

Properties

stateId

stateId: string

The name of a state file.


surface?

optional surface?: string

Either name or index of a surface to be added to your product. The surface indexes start from 0. By default, the first page is added to a product.


name?

optional name?: string

A new name of surface.

Was this page helpful?