@unlayer/types 1.510.0 → 1.513.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editor/editor.d.ts +29 -0
- package/package.json +1 -1
package/dist/editor/editor.d.ts
CHANGED
|
@@ -431,12 +431,41 @@ declare class EditorClass<TClassDisplayMode extends DisplayMode | undefined = un
|
|
|
431
431
|
setTextDirection(textDirection: TextDirection | null): void;
|
|
432
432
|
setTranslations(translations: Translations): void;
|
|
433
433
|
loadBlank(bodyValues?: object): void;
|
|
434
|
+
/**
|
|
435
|
+
* Loads a design JSON into the editor, replacing the current design.
|
|
436
|
+
*
|
|
437
|
+
* Get design JSON from `saveDesign()` or `exportHtml()`, or generate it from React code with
|
|
438
|
+
* `renderToJson()` from `@unlayer/react-elements` (templates written in code by developers,
|
|
439
|
+
* coding agents, or an LLM at runtime stay editable here).
|
|
440
|
+
*
|
|
441
|
+
* @see https://docs.unlayer.com/builder/load-and-save-designs
|
|
442
|
+
* @see https://docs.unlayer.com/elements
|
|
443
|
+
*/
|
|
434
444
|
loadDesign<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(design: JSONTemplate<TDisplayMode>): void;
|
|
445
|
+
/**
|
|
446
|
+
* Returns the current design JSON in the callback. Store it and pass it to `loadDesign()` to
|
|
447
|
+
* reopen the design for editing later.
|
|
448
|
+
*
|
|
449
|
+
* @see https://docs.unlayer.com/builder/load-and-save-designs
|
|
450
|
+
*/
|
|
435
451
|
saveDesign<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: JSONTemplate<TDisplayMode>) => void, options?: SaveDesignOptions): void;
|
|
452
|
+
/**
|
|
453
|
+
* Exports the current design as HTML. The callback receives `{ html, design }`: send or render
|
|
454
|
+
* the `html`, and store the `design` JSON to reopen it with `loadDesign()`.
|
|
455
|
+
*
|
|
456
|
+
* @see https://docs.unlayer.com/builder/export-html
|
|
457
|
+
*/
|
|
436
458
|
exportHtml<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportHtmlResult<TDisplayMode>) => void, options?: ExportHtmlOptions): void;
|
|
437
459
|
exportLiveHtml<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportLiveHtmlResult<TDisplayMode>) => void, options?: ExportLiveHtmlOptions): void;
|
|
438
460
|
exportPlainText<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportPlainTextResult<TDisplayMode>) => void, options?: ExportPlainTextOptions): void;
|
|
439
461
|
exportImage<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportFromApiResult<TDisplayMode>) => void, options?: ExportImageFromApiOptions): void;
|
|
462
|
+
/**
|
|
463
|
+
* Exports the current design as a PDF. Unlike `exportHtml()`, the PDF is generated by Unlayer's
|
|
464
|
+
* Cloud API, uploaded to your connected file storage, and the callback receives
|
|
465
|
+
* `{ url, design }`.
|
|
466
|
+
*
|
|
467
|
+
* @see https://docs.unlayer.com/builder/export-pdf
|
|
468
|
+
*/
|
|
440
469
|
exportPdf<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportFromApiResult<TDisplayMode>) => void, options?: ExportPdfFromApiOptions): void;
|
|
441
470
|
exportZip<TDisplayMode extends DisplayMode | undefined = TClassDisplayMode>(callback: (data: ExportFromApiResult<TDisplayMode>) => void, options?: ExportZipFromApiOptions): void;
|
|
442
471
|
setAppearance(appearance: DeepPartial<AppearanceConfig>): void;
|