mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-23 15:34:06 +01:00
This commit is contained in:
parent
ec15f672c3
commit
1edd35029e
2 changed files with 17 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ import {globalCommand} from "./global";
|
|||
import {getDisplayName, getNotebookName, getTopPaths, movePathTo, moveToPath, pathPosix} from "../../../util/pathName";
|
||||
import {hintMoveBlock} from "../../../protyle/hint/extend";
|
||||
import {fetchSyncPost} from "../../../util/fetch";
|
||||
import {focusByRange} from "../../../protyle/util/selection";
|
||||
|
||||
export const commandPanel = (app: App) => {
|
||||
const range = getSelection().rangeCount > 0 ? getSelection().getRangeAt(0) : undefined;
|
||||
|
|
@ -41,7 +42,12 @@ export const commandPanel = (app: App) => {
|
|||
<kbd>${window.siyuan.languages.enterKey}/${window.siyuan.languages.click}</kbd> ${window.siyuan.languages.confirm}
|
||||
<kbd>Esc</kbd> ${window.siyuan.languages.close}
|
||||
</div>
|
||||
</div>`
|
||||
</div>`,
|
||||
destroyCallback() {
|
||||
if (range) {
|
||||
focusByRange(range);
|
||||
}
|
||||
},
|
||||
});
|
||||
dialog.element.setAttribute("data-key", Constants.DIALOG_COMMANDPANEL);
|
||||
const listElement = dialog.element.querySelector("#commands");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue