瀏覽代碼

:sparkles: https://github.com/siyuan-note/siyuan/issues/4981

Vanessa 2 年之前
父節點
當前提交
436f439dd1
共有 1 個文件被更改,包括 20 次插入0 次删除
  1. 20 0
      app/src/menus/protyle.ts

+ 20 - 0
app/src/menus/protyle.ts

@@ -219,6 +219,26 @@ export const refMenu = (protyle: IProtyle, element: HTMLElement) => {
             }
         });
     }
+    submenu.push({
+        label: "原始块",
+        click() {
+            fetchPost("/api/block/swapBlockRef", {
+                refID: id,
+                defID: refBlockId,
+                includeChildren: false
+            })
+        }
+    });
+    submenu.push({
+        label: "原始块及子块",
+        click() {
+            fetchPost("/api/block/swapBlockRef", {
+                refID: id,
+                defID: refBlockId,
+                includeChildren: true
+            })
+        }
+    });
     window.siyuan.menus.menu.append(new MenuItem({
         label: window.siyuan.languages.turnInto,
         icon: "iconRefresh",