@mocanvas/editor · function
declare function moveShapesToPage(editor: Editor, ids: readonly ShapeId[], pageId: PageId): voidMove shapes — and everything under them — to another page.
Descendants come along whether or not they were named, because a shape without its children on the same page is not a shape any more. Bindings between moved shapes survive; bindings to shapes left behind are dropped, since a binding cannot span two pages.
The moved shapes end up selected on the destination page, which is what makes "move to page" followed by a nudge do what it looks like it should.
mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.