This commit is contained in:
Vanessa 2022-09-28 12:14:18 +08:00
parent 51414491e7
commit e4dade95b7
8 changed files with 24 additions and 27 deletions

View file

@ -4,7 +4,6 @@ import {processPasteCode, processRender} from "./processCode";
import {writeText} from "./compatibility";
/// #if !BROWSER
import {clipboard} from "electron";
import * as path from "path";
/// #endif
import {hasClosestBlock} from "./hasClosest";
import {focusByWbr, getEditorRange} from "./selection";
@ -111,7 +110,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
}
// 复制标题及其下方块使用 writeText需将 textPLain 转换为 textHTML
if (textPlain.endsWith(Constants.ZWSP) && !textHTML) {
textHTML = textPlain
textHTML = textPlain;
}
/// #if !MOBILE
if (!textHTML && !textPlain && ("clipboardData" in event)) {