MCPcopy
hub / github.com/GrapesJS/grapesjs / storeData

Method storeData

packages/core/src/editor/model/Editor.ts:937–949  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

935 }
936
937 storeData(): ProjectData {
938 let result = {};
939 // Sync content if there is an active RTE
940 const editingCmp = this.getEditing();
941 editingCmp && editingCmp.trigger('sync:content', { noCount: true });
942
943 this.storables.forEach((m) => {
944 result = { ...result, ...m.store(1) };
945 });
946 const project = JSON.parse(JSON.stringify(result));
947 this.trigger(EditorEvents.projectGet, { project });
948 return project;
949 }
950
951 loadData(project: ProjectData = {}, options: EditorLoadOptions = {}): ProjectData {
952 const evData = { project, options, initial: !!options.initial };

Callers 1

storeMethod · 0.95

Calls 4

getEditingMethod · 0.95
triggerMethod · 0.95
storeMethod · 0.65
parseMethod · 0.45

Tested by

no test coverage detected