@mocanvas/editor · function

updatePage

declare function updatePage(editor: Editor, partial: Partial<Omit<Page, "typeName">> & {
    id: PageId;
}): void

Change a page's own fields — its name, its meta, its index among the other pages.

renamePage is the special case of this that people reach for most; this is the general form, and the only way to write a page's meta.

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.