Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2025-04-25 17:00:52 +08:00
commit a7c989f064
14 changed files with 121 additions and 71 deletions

View file

@ -1217,7 +1217,7 @@
"copy": "Copie",
"copyText": "Copier le texte *",
"delete-column": "Supprimer une Colonne",
"delete-row": "Supprimer la rangée",
"delete-row": "Supprimer la ligne",
"down": "En bas",
"downloadTip": "Ce navigateur ne prend pas en charge la fonction de téléchargement",
"edit-mode": "Mode Toggle",
@ -1269,7 +1269,7 @@
"recording": "Enregistrement en cours...",
"redo": "Refaire",
"remove": "Supprimer",
"row": "Rangée",
"row": "Ligne",
"splitView": "Vue partagée",
"strike": "Strike",
"table": "Tableau",

View file

@ -1,4 +1,4 @@
import {getTextStar, paste} from "../util/paste";
import {enableLuteMarkdownSyntax, getTextStar, paste, restoreLuteMarkdownSyntax} from "../util/paste";
import {
hasClosestBlock,
hasClosestByAttribute,
@ -442,7 +442,9 @@ export class WYSIWYG {
.replace(new RegExp(Constants.ZWSP, "g"), "");
event.clipboardData.setData("text/plain", textPlain);
event.clipboardData.setData("text/html", selectTableElement ? html : protyle.lute.BlockDOM2HTML(selectAVElement ? textPlain : html));
enableLuteMarkdownSyntax(protyle);
event.clipboardData.setData("text/siyuan", selectTableElement ? protyle.lute.HTML2BlockDOM(html) : html);
restoreLuteMarkdownSyntax(protyle);
});
this.element.addEventListener("mousedown", (event: MouseEvent) => {
@ -1702,7 +1704,9 @@ export class WYSIWYG {
textPlain = textPlain.replace(/\u00A0/g, " "); // Replace non-breaking spaces with normal spaces when copying https://github.com/siyuan-note/siyuan/issues/9382
event.clipboardData.setData("text/plain", textPlain);
event.clipboardData.setData("text/html", selectTableElement ? html : protyle.lute.BlockDOM2HTML(selectAVElement ? textPlain : html));
enableLuteMarkdownSyntax(protyle);
event.clipboardData.setData("text/siyuan", selectTableElement ? protyle.lute.HTML2BlockDOM(html) : html);
restoreLuteMarkdownSyntax(protyle);
});
let beforeContextmenuRange: Range;

File diff suppressed because one or more lines are too long