Callable functions on Topol Plugin
ts
export default interface ITopolPlugin {
init: (topolOptions: ITopolOptions) => void;
save: () => void;
load: (json: JSON) => void;
togglePreview: () => void;
togglePreviewSize: () => void;
chooseFile: (url: string) => void;
undo: () => void;
redo: () => void;
setSavedBlocks: (savedBlocks: ISavedBlock[]) => void;
createNotification: (notification: INotification) => void;
changeEmailToMobile: () => void;
changeEmailToDesktop: () => void;
toggleBlocksAndStructuresVisibility: () => void;
destroy: () => void;
setPreviewHTML: (html: unknown) => void;
setActiveMembers: (activeMemers: unknown) => void;
openPremadeTemplatesSelection: () => void;
updateApiAuthorizationHeader: (
newAuthHeader: string | Record<string, string>
) => void;
setTemplateName(newName: string): void;
refreshComments(key: string): void;
updateCustomBlockContent(content: string): void;
}
Example
U can call these functions in your app using the window helper
js
window.TopolPlugin.save();