This commit is contained in:
Vanessa 2022-08-26 23:49:07 +08:00
parent 2289b44f0c
commit ce31cca404

View file

@ -94,10 +94,12 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
Array.from(xmlDom.getElementsByTagName("string")).forEach(item => { Array.from(xmlDom.getElementsByTagName("string")).forEach(item => {
localFiles.push(item.childNodes[0].nodeValue); localFiles.push(item.childNodes[0].nodeValue);
}); });
if (localFiles.length > 0) {
uploadLocalFiles(localFiles, protyle); uploadLocalFiles(localFiles, protyle);
writeText(""); writeText("");
/// #endif
return; return;
}
/// #endif
} else { } else {
const xmlString = await fetchSyncPost("/api/clipboard/readFilePaths", {}); const xmlString = await fetchSyncPost("/api/clipboard/readFilePaths", {});
if (xmlString.data.length > 0) { if (xmlString.data.length > 0) {