mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
380384ac0e
commit
49385e48de
1 changed files with 5 additions and 3 deletions
|
|
@ -193,11 +193,13 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
|
||||||
isHTML = true;
|
isHTML = true;
|
||||||
} else if (textHTML.replace("<!--StartFragment--><!--EndFragment-->", "").trim() !== "") {
|
} else if (textHTML.replace("<!--StartFragment--><!--EndFragment-->", "").trim() !== "") {
|
||||||
textHTML = textHTML.replace("<!--StartFragment-->", "").replace("<!--EndFragment-->", "").trim();
|
textHTML = textHTML.replace("<!--StartFragment-->", "").replace("<!--EndFragment-->", "").trim();
|
||||||
// 浏览器上复制单个图片应拷贝到本地,excel 中的复制需粘贴
|
if (files && files.length === 1 && (
|
||||||
console.log(textHTML);
|
textHTML.startsWith("<img") || // 浏览器上复制单个图片
|
||||||
if (files && files.length === 1 && textHTML.indexOf("<img") > -1) {
|
(textHTML.startsWith("<table") && textHTML.split("<table").length === 2 && textHTML.indexOf("<img") > -1) // excel 中的复制带有图片的表格
|
||||||
|
)) {
|
||||||
isHTML = false;
|
isHTML = false;
|
||||||
} else {
|
} else {
|
||||||
|
// 需注意 Edge 中的画选不应识别为图片 https://github.com/siyuan-note/siyuan/issues/7021
|
||||||
isHTML = true;
|
isHTML = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue