Hey folks! ![]()
We’re excited to announce that the Design Editing API now supports Multi-Page Editing in Beta!
What it does
The new all_pages design context lets your apps work across ALL pages in a design, not just the current page. You can now iterate through and edit every page in a multi-page design.
Why it matters
Until now, apps were limited to editing only the current page. This was a major limitation for bulk editing workflows - imagine needing to update brand colors across 50 presentation slides! This unlocks a whole new category of powerful design tools! ![]()
How to use it
1. Switch to the preview package to access the new APIs:
npm install @canva/design@beta
2. Use the new context: all_pages, and use session.helpers.openPage() to iterate through session.pageRefs (a catalog of all pages) and edit individual pages:
openDesign({ type: 'all_pages' }, async session => {
for (const pageRef of session.pageRefs.toArray()) {
if (pageRef.type !== 'absolute' || pageRef.locked) continue;
await session.helpers.openPage(pageRef, async pageResult => {
pageResult.page.elements.forEach(element => {
if (element.type === 'unsupported' || element.locked) return;
// Update all supported elements across all pages
element.top += 10;
element.left += 10;
});
});
}
await session.sync(); // Apply all changes at once
});
Docs & details
Happy bulk editing!