mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-05 12:20:16 +01:00
This commit is contained in:
parent
ac31b61a19
commit
609b50d40a
8 changed files with 19 additions and 3 deletions
|
|
@ -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: "⌥⌘."},
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue