mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 05:29:08 +08:00
fix: globalThis.editor is undefined (#1590)
This commit is contained in:
@@ -84,7 +84,7 @@ export const EditorOptionMenu = () => {
|
|||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
globalThis.editor.contentParser.onExportHtml();
|
globalThis.currentEditor.contentParser.onExportHtml();
|
||||||
}}
|
}}
|
||||||
icon={<ExportToHtmlIcon />}
|
icon={<ExportToHtmlIcon />}
|
||||||
iconSize={[20, 20]}
|
iconSize={[20, 20]}
|
||||||
@@ -94,7 +94,7 @@ export const EditorOptionMenu = () => {
|
|||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
globalThis.editor.contentParser.onExportMarkdown();
|
globalThis.currentEditor.contentParser.onExportMarkdown();
|
||||||
}}
|
}}
|
||||||
icon={<ExportToMarkdownIcon />}
|
icon={<ExportToMarkdownIcon />}
|
||||||
iconSize={[20, 20]}
|
iconSize={[20, 20]}
|
||||||
|
|||||||
Reference in New Issue
Block a user