Skip to content

Commit

Permalink
🎨 #11561
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Nov 20, 2024
1 parent df3bafd commit dea6ecd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/src/protyle/wysiwyg/commonHotkey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent, nodeElemen
if (matchHotKey(window.siyuan.config.keymap.editor.general.copyProtocolInMd.custom, event)) {
if (nodeElement) {
const selectElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
if (selectElements.length > 0) {
if (selectElements.length === 0) {
selectElements.push(nodeElement);
}
copyTextByType(selectElements.map(item => item.getAttribute("data-node-id")), "protocolMd")
Expand All @@ -67,7 +67,7 @@ export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent, nodeElemen
if (matchHotKey(window.siyuan.config.keymap.editor.general.copyID.custom, event)) {
if (nodeElement) {
const selectElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
if (selectElements.length > 0) {
if (selectElements.length === 0) {
selectElements.push(nodeElement);
}
copyTextByType(selectElements.map(item => item.getAttribute("data-node-id")), "id")
Expand All @@ -81,7 +81,7 @@ export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent, nodeElemen
if (matchHotKey(window.siyuan.config.keymap.editor.general.copyProtocol.custom, event)) {
if (nodeElement) {
const selectElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
if (selectElements.length > 0) {
if (selectElements.length === 0) {
selectElements.push(nodeElement);
}
copyTextByType(selectElements.map(item => item.getAttribute("data-node-id")), "protocol")
Expand All @@ -96,7 +96,7 @@ export const commonHotkey = (protyle: IProtyle, event: KeyboardEvent, nodeElemen
if (matchHotKey(window.siyuan.config.keymap.editor.general.copyBlockEmbed.custom, event)) {
if (nodeElement) {
const selectElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
if (selectElements.length > 0) {
if (selectElements.length === 0) {
selectElements.push(nodeElement);
}
copyTextByType(selectElements.map(item => item.getAttribute("data-node-id")), "blockEmbed")
Expand Down

0 comments on commit dea6ecd

Please sign in to comment.