Closed ArchanaSharma95 closed 4 years ago
I want to load data from html file on editor load, please tell me the event and prop to load data when the editor initialised. Also needs an event to export html from editor. Basically I want to add "Import" and "Export HTML" button at the top of editor.
Please see Editor component's props interface:
export interface EditorProps {
id?: string;
presetType?: SupportedPresetType;
plugins?: string[];
storageManager?: any;
blockManager?: any;
styleManager?: {};
width?: string | number;
height?: string | number;
components?: object[];
blocks?: object[];
onInit?(editor: IEditor): void;
onDestroy?(editor: IEditor): void;
}
Using onInit
prop. You might want to read Grapesjs official documentation for editor api references.
I want to load data from html file on editor load, please tell me the event and prop to load data when the editor initialised. Also needs an event to export html from editor. Basically I want to add "Import" and "Export HTML" button at the top of editor.