diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts
index c71145ba7..d2969c9e8 100644
--- a/app/src/protyle/export/index.ts
+++ b/app/src/protyle/export/index.ts
@@ -37,6 +37,13 @@ export const saveExport = (option: { type: string, id: string }) => {
+
@@ -50,8 +57,9 @@ export const saveExport = (option: { type: string, id: string }) => {
});
btnsElement[1].addEventListener("click", () => {
const removeAssets = (wordDialog.element.querySelector("#removeAssets") as HTMLInputElement).checked;
- localStorage.setItem(Constants.LOCAL_EXPORTWORD, removeAssets.toString());
- getExportPath(option, removeAssets);
+ const mergeSubdocs = (wordDialog.element.querySelector("#mergeSubdocs") as HTMLInputElement).checked;
+ localStorage.setItem(Constants.LOCAL_EXPORTWORD, JSON.stringify({removeAssets, mergeSubdocs}));
+ getExportPath(option, removeAssets, mergeSubdocs);
wordDialog.destroy();
});
} else {
@@ -473,7 +481,7 @@ export const destroyPrintWindow = () => {
window.siyuan.printWin.destroy();
};
-const getExportPath = (option: { type: string, id: string }, removeAssets?: boolean) => {
+const getExportPath = (option: { type: string, id: string }, removeAssets?: boolean, mergeSubdocs?: boolean) => {
fetchPost("/api/block/getBlockInfo", {
id: option.id
}, (response) => {
@@ -516,7 +524,8 @@ const getExportPath = (option: { type: string, id: string }, removeAssets?: bool
fetchPost(url, {
id: option.id,
pdf: option.type === "pdf",
- removeAssets,
+ removeAssets: removeAssets,
+ merge: mergeSubdocs,
savePath
}, exportResponse => {
if (option.type === "word") {