mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-02 14:58:49 +01:00
This commit is contained in:
parent
8c0c1185e7
commit
cfbe6a401a
1 changed files with 6 additions and 6 deletions
|
|
@ -18,7 +18,7 @@ import {getCurrentWindow} from "@electron/remote";
|
|||
import {Constants} from "../../constants";
|
||||
import {hasClosestByClassName} from "../util/hasClosest";
|
||||
import {matchHotKey} from "../util/hotKey";
|
||||
import {updateHotkeyTip, writeText} from "../util/compatibility";
|
||||
import {readText, updateHotkeyTip, writeText} from "../util/compatibility";
|
||||
import {escapeHtml} from "../../util/escape";
|
||||
import * as dayjs from "dayjs";
|
||||
import {setPanelFocus} from "../../layout/util";
|
||||
|
|
@ -211,12 +211,12 @@ export class Title {
|
|||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
label: window.siyuan.languages.paste,
|
||||
accelerator: "⌘V",
|
||||
click: () => {
|
||||
click: async () => {
|
||||
focusByRange(getEditorRange(this.editElement));
|
||||
document.execCommand("paste");
|
||||
setTimeout(() => {
|
||||
this.rename(protyle);
|
||||
}, Constants.TIMEOUT_INPUT);
|
||||
// 不能使用 execCommand https://github.com/siyuan-note/siyuan/issues/7045
|
||||
const text = await readText()
|
||||
document.execCommand("insertText", false, replaceFileName(text));
|
||||
this.rename(protyle);
|
||||
}
|
||||
}).element);
|
||||
window.siyuan.menus.menu.append(new MenuItem({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue