🎨 Android 端图片复制 PNG 粘贴问题 https://github.com/siyuan-note/siyuan/issues/5494
This commit is contained in:
parent
4d48e8c613
commit
7399e531e0
3 changed files with 11 additions and 7 deletions
|
@ -7,7 +7,9 @@ import {
|
|||
focusSideBlock,
|
||||
getEditorRange,
|
||||
getSelectionOffset,
|
||||
getSelectionPosition, setFirstNodeRange, setLastNodeRange
|
||||
getSelectionPosition,
|
||||
setFirstNodeRange,
|
||||
setLastNodeRange
|
||||
} from "../util/selection";
|
||||
import {hasClosestBlock, hasClosestByAttribute, hasClosestByClassName, hasClosestByMatchTag} from "../util/hasClosest";
|
||||
import {Link} from "./Link";
|
||||
|
@ -18,11 +20,7 @@ import {mathRender} from "../markdown/mathRender";
|
|||
import {getEventName} from "../util/compatibility";
|
||||
import {upDownHint} from "../../util/upDownHint";
|
||||
import {highlightRender} from "../markdown/highlightRender";
|
||||
import {
|
||||
getContenteditableElement,
|
||||
hasNextSibling,
|
||||
hasPreviousSibling
|
||||
} from "../wysiwyg/getBlock";
|
||||
import {getContenteditableElement, hasNextSibling, hasPreviousSibling} from "../wysiwyg/getBlock";
|
||||
import {processRender} from "../util/processCode";
|
||||
import {BlockRef} from "./BlockRef";
|
||||
import {hintMoveBlock, hintRef, hintRenderAssets, hintRenderTemplate, hintRenderWidget} from "../hint/extend";
|
||||
|
@ -746,6 +744,12 @@ export class Toolbar {
|
|||
});
|
||||
}, 100);
|
||||
/// #endif
|
||||
|
||||
// TODO: V,Android 端图片复制 PNG 粘贴问题 https://github.com/siyuan-note/siyuan/issues/5494
|
||||
// if ("android" === window.siyuan.config.system.container && window.JSAndroid) {
|
||||
// window.JSAndroid.writeImageClipboard(uri);
|
||||
// return;
|
||||
// }
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -2,7 +2,6 @@ export const writeText = async (text: string) => {
|
|||
try {
|
||||
// navigator.clipboard.writeText 抛出异常不进入 catch,这里需要先处理移动端复制
|
||||
if ("android" === window.siyuan.config.system.container && window.JSAndroid) {
|
||||
|
||||
window.JSAndroid.writeClipboard(text);
|
||||
return;
|
||||
}
|
||||
|
|
1
app/src/types/index.d.ts
vendored
1
app/src/types/index.d.ts
vendored
|
@ -16,6 +16,7 @@ interface Window {
|
|||
openExternal(url: string): void
|
||||
changeStatusBarColor(color: string, mode: number): void
|
||||
writeClipboard(text: string): void
|
||||
writeImageClipboard(uri: string): void
|
||||
}
|
||||
|
||||
goBack(): void
|
||||
|
|
Loading…
Add table
Reference in a new issue