Skip to content

textmode.export.js / JSONExportOptions

Type Alias: JSONExportOptions

ts
type JSONExportOptions = LayerExportOptions & object;

Options for exporting the textmode content to JSON format.

Type Declaration

NameTypeDescription
target?JSONExportTargetScope of the JSON export. Use 'selected' to export one layer, or 'all' to export the base layer and every user-created layer. Defaults to 'selected'.
filename?stringThe filename to save the JSON file as. If not provided, a default filename is used.
pretty?boolean | numberPretty-print the generated JSON. When set to true, output uses two-space indentation. When set to a number, that value is used as indentation width. When false, the output is minified. Defaults to true.
colorMode?JSONExportColorModeColor representation used for foreground and background values. Defaults to 'hex'.
includeMetadata?booleanWhether to include export metadata such as timestamp and generator details. Defaults to true.