🎁 Unwrapping the Tenth festive release for 2024: Content Querying API now in GA!

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:

  1. Install the latest package:
npm install @canva/design@latest
  1. 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

  • :bullseye: DOM-style content querying
  • :artist_palette: Rich text formatting preservation
  • :high_voltage: Efficient batch operations
  • :counterclockwise_arrows_button: Automatic conflict resolution

Stay tuned for more :wrapped_gift:s dropping throughout this week! Keep your eyes peeled for more developer goodies coming your way in our Developer Christmas celebration! :eyes:

8 Likes

My favourite announcement so far :gift::gift:

2 Likes