From 81ac980ebbb3f5df9c0cd429ce84391e39015ad2 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 16 Jun 2022 14:54:59 +0200 Subject: [PATCH] Add getProjectData/loadProjectData in TS --- index.d.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/index.d.ts b/index.d.ts index 68bf885f3..28d86cb59 100644 --- a/index.d.ts +++ b/index.d.ts @@ -851,13 +851,6 @@ declare namespace grapesjs { * const storedData = await editor.store(); */ store(options: StorageOptions): Promise; - /** - * Get the JSON data object, which could be stored and loaded back with `editor.loadData(json)` - * @example - * console.log(editor.storeData()); - * // { pages: [...], styles: [...], ... } - */ - storeData(): any; /** * Load data from the current storage * @param options - Storage options @@ -867,13 +860,20 @@ declare namespace grapesjs { */ load(options: StorageOptions): Promise; /** - * Load data from the JSON data object + * Get the JSON project data, which could be stored and loaded back with `editor.loadProjectData(json)` + * @returns {Object} + * @example + * console.log(editor.getProjectData()); + * // { pages: [...], styles: [...], ... } + */ + getProjectData(): any; + /** + * Load data from the JSON project + * @param {Object} data Project to load * @example - * editor.loadData({ pages: [...], styles: [...], ... }) - * @param data - Data to load - * @returns Loaded object + * editor.loadProjectData({ pages: [...], styles: [...], ... }) */ - loadData(data: any): any; + loadProjectData(data: any): any; /** * Returns container element. The one which was indicated as 'container' * on init method