getExport

API reference for the getExport function.

Initializes the Export capability.

Under the hood, this function:

  • Gets the export property from the window.canva object
  • Throws an error if the export property is not available
  • Provides type-safety when using TypeScript
import { getExport } from "@canva/preview/export";
const api = getExport();
console.log(api); // => Export

An object that exposes the following methods: