mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 02:36:10 +01:00
This commit is contained in:
parent
1900b935aa
commit
7c1f7a8280
2 changed files with 39 additions and 3 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import {hasClosestBlock} from "../../../protyle/util/hasClosest";
|
||||
import {getTopAloneElement} from "../../../protyle/wysiwyg/getBlock";
|
||||
import {enterBack, zoomOut} from "../../../menus/protyle";
|
||||
import {openFileById} from "../../../editor/util";
|
||||
import {Constants} from "../../../constants";
|
||||
|
||||
export const onlyProtyleCommand = (options: {
|
||||
command: string,
|
||||
|
|
@ -17,7 +19,16 @@ export const onlyProtyleCommand = (options: {
|
|||
topNodeElement.nextElementSibling?.classList.contains("list") && topNodeElement.previousElementSibling.classList.contains("protyle-action")) {
|
||||
topNodeElement = topNodeElement.parentElement;
|
||||
}
|
||||
zoomOut({protyle: options.protyle, id: topNodeElement.getAttribute("data-node-id")});
|
||||
const id = topNodeElement.getAttribute("data-node-id")
|
||||
if (options.protyle.options.backlinkData) {
|
||||
openFileById({
|
||||
app: options.protyle.app,
|
||||
id,
|
||||
action: [Constants.CB_GET_ALL, Constants.CB_GET_FOCUS]
|
||||
});
|
||||
} else {
|
||||
zoomOut({protyle: options.protyle, id});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (options.command === "enterBack") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue