mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-31 22:08:48 +01:00
copySubMenu
This commit is contained in:
parent
eb81057d2b
commit
de5d4b65e5
2 changed files with 10 additions and 0 deletions
|
|
@ -372,6 +372,7 @@ export const openAttr = (nodeElement: Element, focusName = "bookmark", protyle?:
|
|||
|
||||
export const copySubMenu = (id: string, accelerator = true, focusElement?: Element) => {
|
||||
return [{
|
||||
id: "copyBlockRef",
|
||||
iconHTML: "",
|
||||
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyBlockRef.custom : undefined,
|
||||
label: window.siyuan.languages.copyBlockRef,
|
||||
|
|
@ -384,6 +385,7 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme
|
|||
}
|
||||
}
|
||||
}, {
|
||||
id: "copyBlockEmbed",
|
||||
iconHTML: "",
|
||||
label: window.siyuan.languages.copyBlockEmbed,
|
||||
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyBlockEmbed.custom : undefined,
|
||||
|
|
@ -394,6 +396,7 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme
|
|||
}
|
||||
}
|
||||
}, {
|
||||
id: "copyProtocol",
|
||||
iconHTML: "",
|
||||
label: window.siyuan.languages.copyProtocol,
|
||||
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyProtocol.custom : undefined,
|
||||
|
|
@ -404,6 +407,7 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme
|
|||
}
|
||||
}
|
||||
}, {
|
||||
id: "copyProtocolInMd",
|
||||
iconHTML: "",
|
||||
label: window.siyuan.languages.copyProtocolInMd,
|
||||
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyProtocolInMd.custom : undefined,
|
||||
|
|
@ -416,6 +420,7 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme
|
|||
}
|
||||
}
|
||||
}, {
|
||||
id: "copyHPath",
|
||||
iconHTML: "",
|
||||
label: window.siyuan.languages.copyHPath,
|
||||
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyHPath.custom : undefined,
|
||||
|
|
@ -427,6 +432,7 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme
|
|||
});
|
||||
}
|
||||
}, {
|
||||
id: "copyID",
|
||||
iconHTML: "",
|
||||
label: window.siyuan.languages.copyID,
|
||||
accelerator: accelerator ? window.siyuan.config.keymap.editor.general.copyID.custom : undefined,
|
||||
|
|
|
|||
|
|
@ -1182,6 +1182,7 @@ export class Gutter {
|
|||
}
|
||||
|
||||
const copyMenu = (copySubMenu(id, true, nodeElement) as IMenu[]).concat([{
|
||||
id: "copyPlainText",
|
||||
iconHTML: "",
|
||||
label: window.siyuan.languages.copyPlainText,
|
||||
accelerator: window.siyuan.config.keymap.editor.general.copyPlainText.custom,
|
||||
|
|
@ -1190,6 +1191,7 @@ export class Gutter {
|
|||
focusBlock(nodeElement);
|
||||
}
|
||||
}, {
|
||||
id: "copyMirror",
|
||||
iconHTML: "",
|
||||
label: type === "NodeAttributeView" ? window.siyuan.languages.copyMirror : window.siyuan.languages.copy,
|
||||
accelerator: "⌘C",
|
||||
|
|
@ -1202,6 +1204,7 @@ export class Gutter {
|
|||
document.execCommand("copy");
|
||||
}
|
||||
}, {
|
||||
id: "duplicateMirror",
|
||||
iconHTML: "",
|
||||
label: type === "NodeAttributeView" ? window.siyuan.languages.duplicateMirror : window.siyuan.languages.duplicate,
|
||||
accelerator: window.siyuan.config.keymap.editor.general.duplicate.custom,
|
||||
|
|
@ -1212,6 +1215,7 @@ export class Gutter {
|
|||
}]);
|
||||
if (type === "NodeAttributeView") {
|
||||
copyMenu.push({
|
||||
id: "duplicateCompletely",
|
||||
iconHTML: "",
|
||||
label: window.siyuan.languages.duplicateCompletely,
|
||||
accelerator: window.siyuan.config.keymap.editor.general.duplicateCompletely.custom,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue