This commit is contained in:
parent
a92be962d4
commit
1fac9971e9
1 changed files with 4 additions and 8 deletions
|
@ -716,15 +716,11 @@ export class Gutter {
|
|||
accelerator: "⌘C",
|
||||
click() {
|
||||
if (isNotEditBlock(selectsElement[0])) {
|
||||
let html = "";
|
||||
selectsElement.forEach(item => {
|
||||
html += removeEmbed(item);
|
||||
});
|
||||
writeText(protyle.lute.BlockDOM2StdMd(html).trimEnd());
|
||||
focusBlock(selectsElement[0]);
|
||||
} else {
|
||||
focusByRange(getEditorRange(selectsElement[0]));
|
||||
document.execCommand("copy");
|
||||
}
|
||||
document.execCommand("copy");
|
||||
}
|
||||
}, {
|
||||
label: window.siyuan.languages.copyPlainText,
|
||||
|
@ -1157,11 +1153,11 @@ export class Gutter {
|
|||
accelerator: "⌘C",
|
||||
click() {
|
||||
if (isNotEditBlock(nodeElement)) {
|
||||
writeText(protyle.lute.BlockDOM2StdMd(removeEmbed(nodeElement)).trimEnd());
|
||||
focusBlock(nodeElement);
|
||||
} else {
|
||||
focusByRange(getEditorRange(nodeElement));
|
||||
document.execCommand("copy");
|
||||
}
|
||||
document.execCommand("copy");
|
||||
}
|
||||
}, {
|
||||
label: window.siyuan.languages.copyPlainText,
|
||||
|
|
Loading…
Add table
Reference in a new issue