Vanessa 2023-07-12 18:32:23 +08:00
parent ac31b61a19
commit 609b50d40a
8 changed files with 19 additions and 3 deletions

View file

@ -899,6 +899,7 @@
"column": "Column",
"copied": "Copied",
"copy": "Copy",
"copyText": "Copy text *",
"delete-column": "Delete Column",
"delete-row": "Delete Row",
"down": "Down",

View file

@ -899,6 +899,7 @@
"column": "Columna",
"copied": "Copiado",
"copy": "Copiar",
"copyText": "Copiar texto *",
"delete-column": "Borrar columna",
"delete-row": "Borrar fila",
"down": "Abajo",

View file

@ -899,6 +899,7 @@
"column": "Colonne",
"copied": "Copié",
"copy": "Copie",
"copyText": "Copier le texte *",
"delete-column": "Supprimer une Colonne",
"delete-row": "Supprimer la rangée",
"down": "En bas",

View file

@ -899,6 +899,7 @@
"column": "行",
"copied": "已複製",
"copy": "複製",
"copyText": "複製 文本 *",
"delete-column": "刪除行",
"delete-row": "刪除列",
"down": "下",

View file

@ -899,6 +899,7 @@
"column": "列",
"copied": "已复制",
"copy": "复制",
"copyText": "复制 文本 *",
"delete-column": "删除列",
"delete-row": "删除行",
"down": "下",

View file

@ -253,6 +253,7 @@ export abstract class Constants {
hLayout: {default: "", custom: ""},
vLayout: {default: "", custom: ""},
refPopover: {default: "", custom: ""},
copyText: {default: "", custom: ""},
expand: {default: "⌘↓", custom: "⌘↓"},
collapse: {default: "⌘↑", custom: "⌘↑"},
insertBottom: {default: "⌥⌘.", custom: "⌥⌘."},

View file

@ -729,7 +729,7 @@ export class Gutter {
if (protyle?.app?.plugins) {
emitOpenMenu({
plugins:protyle.app.plugins,
plugins: protyle.app.plugins,
type: "click-blockicon",
detail: {
protyle,
@ -1545,7 +1545,7 @@ export class Gutter {
if (protyle?.app?.plugins) {
emitOpenMenu({
plugins:protyle.app.plugins,
plugins: protyle.app.plugins,
type: "click-blockicon",
detail: {
protyle,
@ -1749,7 +1749,8 @@ export class Gutter {
return false;
}
return {
label: `${window.siyuan.languages.copy} ${window.siyuan.languages.text} *`,
accelerator: window.siyuan.config.keymap.editor.general.copyText.custom,
label: window.siyuan.languages.copyText,
click() {
// 用于标识复制文本 *
selectsElement[0].setAttribute("data-reftext", "true");

View file

@ -971,6 +971,15 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
event.stopPropagation();
return true;
}
if (matchHotKey(window.siyuan.config.keymap.editor.general.copyText.custom, event)) {
// 用于标识复制文本 *
nodeElement.setAttribute("data-reftext", "true");
focusByRange(getEditorRange(nodeElement));
document.execCommand("copy");
event.preventDefault();
event.stopPropagation();
return true;
}
if (matchHotKey(window.siyuan.config.keymap.editor.general.copyBlockRef.custom, event)) {
event.preventDefault();
event.stopPropagation();