mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-12 02:04:20 +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") {
|
||||
|
|
|
|||
4
app/src/types/index.d.ts
vendored
4
app/src/types/index.d.ts
vendored
|
|
@ -243,9 +243,11 @@ interface Window {
|
|||
changeStatusBarColor(color: string, mode: number): void
|
||||
writeClipboard(text: string): void
|
||||
writeHTMLClipboard(text: string, html: string): void
|
||||
writeSiYuanHTMLClipboard(text: string, html: string, siyuanHTML: string): void
|
||||
writeImageClipboard(uri: string): void
|
||||
readClipboard(): string
|
||||
readHTMLClipboard(): string
|
||||
readSiYuanHTMLClipboard(): string
|
||||
getBlockURL(): string
|
||||
hideKeyboard(): void
|
||||
showKeyboard(): void
|
||||
|
|
@ -261,8 +263,10 @@ interface Window {
|
|||
changeStatusBarColor(color: string, mode: number): void
|
||||
writeClipboard(text: string): void
|
||||
writeHTMLClipboard(text: string, html: string): void
|
||||
writeSiYuanHTMLClipboard(text: string, html: string, siyuanHTML: string): void
|
||||
readClipboard(): string
|
||||
readHTMLClipboard(): string
|
||||
readSiYuanHTMLClipboard(): string
|
||||
returnDesktop(): void
|
||||
print(title: string, html: string): void
|
||||
getScreenWidthPx(): number
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue