Import/Export
Overview
Kritzel lets you export the current viewport as PNG or SVG and lets you export and import workspaces as JSON. This is useful when you want to save a visual snapshot, preserve an editable canvas state, or move a workspace between environments.
You can either use the dedicated export dialog and import dialog, or handle these operations programmatically from code.
Exporting the Viewport
Call exportViewportAsPng() or exportViewportAsSvg() on the editor to export the current viewport and trigger a browser download.
Exporting the Workspace
Call exportAsJson() on the editor to serialize the active workspace into a JSON string. If you just need a file download instead of the raw string, call downloadAsJson().
Importing a Workspace
To import a previously exported workspace, use importFromJson(). This creates a new workspace with the imported data and automatically switches to it.
API Details
For the full list of related APIs, see the following reference sections.