mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-21 14:34:06 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
dcfa0ac81b
3 changed files with 12 additions and 2 deletions
|
|
@ -1834,9 +1834,9 @@ export class Gutter {
|
|||
removeFoldAttr: nodeElement.getAttribute("fold") !== "1"
|
||||
}, (response) => {
|
||||
if (isInAndroid()) {
|
||||
window.JSAndroid.writeHTMLClipboard(protyle.lute.BlockDOM2StdMd(response.data).trimEnd(), response.data + Constants.ZWSP);
|
||||
window.JSAndroid.writeSiYuanHTMLClipboard(protyle.lute.BlockDOM2StdMd(response.data).trimEnd(), protyle.lute.BlockDOM2HTML(response.data).trimEnd(), response.data + Constants.ZWSP);
|
||||
} else if (isInHarmony()) {
|
||||
window.JSHarmony.writeHTMLClipboard(protyle.lute.BlockDOM2StdMd(response.data).trimEnd(), response.data + Constants.ZWSP);
|
||||
window.JSHarmony.writeSiYuanHTMLClipboard(protyle.lute.BlockDOM2StdMd(response.data).trimEnd(), protyle.lute.BlockDOM2HTML(response.data).trimEnd(), response.data + Constants.ZWSP);
|
||||
} else {
|
||||
writeText(response.data + Constants.ZWSP);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,6 +157,9 @@ export const readClipboard = async () => {
|
|||
const textObj = getTextSiyuanFromTextHTML(text.textHTML);
|
||||
text.textHTML = textObj.textHtml;
|
||||
text.siyuanHTML = textObj.textSiyuan;
|
||||
if (!text.siyuanHTML) {
|
||||
text.siyuanHTML = window.JSAndroid.readSiYuanHTMLClipboard();
|
||||
}
|
||||
return text;
|
||||
}
|
||||
if (isInHarmony()) {
|
||||
|
|
@ -165,6 +168,9 @@ export const readClipboard = async () => {
|
|||
const textObj = getTextSiyuanFromTextHTML(text.textHTML);
|
||||
text.textHTML = textObj.textHtml;
|
||||
text.siyuanHTML = textObj.textSiyuan;
|
||||
if (!text.siyuanHTML) {
|
||||
text.siyuanHTML = window.JSHarmony.readSiYuanHTMLClipboard();
|
||||
}
|
||||
return text;
|
||||
}
|
||||
if (typeof navigator.clipboard === "undefined") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue