Vanessa 2025-02-16 18:04:03 +08:00
parent d579e7511f
commit da11e337aa
6 changed files with 67 additions and 70 deletions

View file

@ -235,7 +235,17 @@ export class Title {
accelerator: "⌘V",
click: async () => {
focusByRange(getEditorRange(this.editElement));
document.execCommand("paste");
if (document.queryCommandSupported("paste")) {
document.execCommand("paste");
} else {
try {
const text = await readText();
document.execCommand("insertText", false, replaceFileName(text));
this.rename(protyle);
} catch (e) {
console.log(e);
}
}
}
}).element);
window.siyuan.menus.menu.append(new MenuItem({