diff --git a/app/electron/main.js b/app/electron/main.js index 9303ebb18..4894c1107 100644 --- a/app/electron/main.js +++ b/app/electron/main.js @@ -485,8 +485,7 @@ const initMainWindow = () => { }); currentWindow.webContents.on('render-process-gone', (event, details) => { - console.log('Reason: ', details.reason); - console.log('Exit code', details.exitCode); + writeLog("Render process gone [reason=" + details.reason + ", exitCode=" + details.exitCode + "]"); }); if (windowState.isDevToolsOpened) { diff --git a/app/src/protyle/util/paste.ts b/app/src/protyle/util/paste.ts index 369057baa..f54148c22 100644 --- a/app/src/protyle/util/paste.ts +++ b/app/src/protyle/util/paste.ts @@ -399,7 +399,6 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven fragment.appendChild(doc.body.firstChild); } - container.innerHTML = ''; container.appendChild(fragment); document.body.removeChild(iframe); @@ -408,7 +407,7 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven // 编辑器内部粘贴 const tempElement = document.createElement("div"); if (1024 * 512 < siyuanHTML.length) { - await streamInsert(tempElement, siyuanHTML) + await streamInsert(tempElement, siyuanHTML); } else { tempElement.innerHTML = siyuanHTML; }