mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-09 16:54:21 +01:00
This commit is contained in:
parent
3d24c68eab
commit
9485a05e51
1 changed files with 6 additions and 1 deletions
|
|
@ -39,7 +39,12 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
|
|||
|
||||
const copyElement = hasClosestByAttribute(event.target, "data-type", "copy");
|
||||
if (copyElement) {
|
||||
writeText(copyElement.previousElementSibling.textContent.trim());
|
||||
const textElement = copyElement.previousElementSibling
|
||||
if (textElement.querySelector(".av__cellicon")) {
|
||||
writeText(`${textElement.firstChild.textContent} ➡️ ${textElement.lastChild.textContent}`);
|
||||
} else {
|
||||
writeText(textElement.textContent);
|
||||
}
|
||||
showMessage(window.siyuan.languages.copied);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue