feat(workspace): add debug clear button

This commit is contained in:
zhangchi
2022-07-25 14:31:45 +08:00
parent 95629486b3
commit 92e195446a
4 changed files with 23 additions and 1 deletions
@@ -40,3 +40,12 @@ export const exportMarkdown = async ({
const htmlContent = await clipboardParse.page2html();
fileExporter.exportMarkdown(title, htmlContent);
};
export const clearWorkspace = async ({
workspaceId,
rootBlockId,
title,
}: ExportHandlerProps) => {
//@ts-ignore
client.inspector().clear();
};
@@ -1,6 +1,10 @@
export { duplicatePage } from './duplicate-page';
export { exportHtml, exportMarkdown } from './handle-export';
export { getPageTitle, usePageLastUpdated } from './get-page-info';
export { importWorkspace, exportWorkspace } from './inspector-workspace';
export {
importWorkspace,
exportWorkspace,
clearWorkspace,
} from './inspector-workspace';
export { useWorkspaceAndPageId } from './use-workspace-page';
export { useReadingMode } from './use-reading-mode';