We’re excited to announce that the Content Querying API is moving to general availability and is now available to everyone! Like finding the perfect gift inside your stocking, this API lets you unwrap and transform text content in Canva designs with DOM-like querying capabilities. This API was previously in beta; it is now released and any apps you’ve been developing that use it can be submitted for app review.
Instructions
Ready to add some holiday magic to your apps? Here’s how to get started:
- Install the latest package:
npm install @canva/design@latest
- Start querying content with this gift-wrapped example:
await readContent(
{
contentType: "richtext",
context: "current_page"
},
async (draft) => {
const plaintext = content.readPlaintext();
// Transform your content here!
await draft.sync();
}
);
Learn More
Key Features to Unwrap
DOM-style content querying
Rich text formatting preservation
Efficient batch operations
Automatic conflict resolution
Stay tuned for more
s dropping throughout this week! Keep your eyes peeled for more developer goodies coming your way in our Developer Christmas celebration! ![]()