Skip to content

Commit

Permalink
🎨 #11460
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed May 23, 2024
1 parent 9f86cb3 commit 91a3184
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/src/protyle/gutter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,13 @@ export class Gutter {
}

const copyMenu = (copySubMenu(id, true, nodeElement) as IMenu[]).concat([{
label: window.siyuan.languages.copyPlainText,
accelerator: window.siyuan.config.keymap.editor.general.copyPlainText.custom,
click() {
copyPlainText(getPlainText(nodeElement as HTMLElement).trimEnd());
focusBlock(nodeElement);
}
}, {
label: type === "NodeAttributeView" ? window.siyuan.languages.copyMirror : window.siyuan.languages.copy,
accelerator: "⌘C",
click() {
Expand All @@ -1223,13 +1230,6 @@ export class Gutter {
}
document.execCommand("copy");
}
}, {
label: window.siyuan.languages.copyPlainText,
accelerator: window.siyuan.config.keymap.editor.general.copyPlainText.custom,
click() {
copyPlainText(getPlainText(nodeElement as HTMLElement).trimEnd());
focusBlock(nodeElement);
}
}, {
label: type === "NodeAttributeView" ? window.siyuan.languages.duplicateMirror : window.siyuan.languages.duplicate,
accelerator: window.siyuan.config.keymap.editor.general.duplicate.custom,
Expand Down Expand Up @@ -1266,7 +1266,7 @@ export class Gutter {
}
const copyTextRefMenu = this.genCopyTextRef([nodeElement]);
if (copyTextRefMenu) {
copyMenu.splice(copyMenu.length - 1, 0, copyTextRefMenu);
copyMenu.splice(7, 0, copyTextRefMenu);
}
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.copy,
Expand Down

0 comments on commit 91a3184

Please sign in to comment.