Skip to content

API sankore : add removePage() function #1383

@profil-digital

Description

@profil-digital

We have created a widget that uses the Sankore API and the addObject function to add a page to the document.

I cannot find a function to delete pages directly with the API.

I would like to do something like:
const pageCount = await window.sankore.pageCount();
for (let i = pageCount - 1; i >= 1; i--) {
await window.sankore.removePage(i);
}

The goal would be to delete all added pages except the first page where the widget is located.

Is it possible to add this function?

Thank you for your help, and well done to the whole team.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions