From 436f439dd1f65148c2014b5a6797b1521d984a5b Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 3 Oct 2022 16:19:49 +0800 Subject: [PATCH] :sparkles: https://github.com/siyuan-note/siyuan/issues/4981 --- app/src/menus/protyle.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index 672cbbc5b..49f0869f0 100644 --- a/app/src/menus/protyle.ts +++ b/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",