diff --git a/components/editorjs/tools/PageTransition.tsx b/components/editorjs/tools/PageTransition.tsx index 8877839279..3196c3c4df 100644 --- a/components/editorjs/tools/PageTransition.tsx +++ b/components/editorjs/tools/PageTransition.tsx @@ -20,19 +20,21 @@ export default class PageTransition implements BlockTool { constructor({ data, + api, }: { api: API; config?: ToolConfig; data?: PageTransitionData; }) { - this.submitLabel = data.label || "Submit"; + this.api = api; + this.submitLabel = data.submitLabel || "Submit"; } save(block: HTMLDivElement) { return { submitLabel: ( block.firstElementChild.firstElementChild - .firstElementChild as HTMLInputElement + .firstElementChild as HTMLElement ).innerHTML, }; } @@ -40,8 +42,8 @@ export default class PageTransition implements BlockTool { render(): HTMLElement { const container = document.createElement("div"); const toolView = ( -