This commit is contained in:
Vanessa 2022-10-25 01:04:47 +08:00
parent e38051d58a
commit 915ab22b51
3 changed files with 34 additions and 35 deletions

View file

@ -8,14 +8,12 @@ import {clipboard} from "electron";
import {hasClosestBlock} from "./hasClosest";
import {focusByWbr, getEditorRange} from "./selection";
import {blockRender} from "../markdown/blockRender";
import * as dayjs from "dayjs";
import {highlightRender} from "../markdown/highlightRender";
import {updateTransaction} from "../wysiwyg/transaction";
import {fetchPost, fetchSyncPost} from "../../util/fetch";
import {isDynamicRef, isFileAnnotation} from "../../util/functions";
import {insertHTML} from "./insertHTML";
import {scrollCenter} from "../../util/highlightById";
import {getContenteditableElement} from "../wysiwyg/getBlock";
import {hideElements} from "../ui/hideElements";
const filterClipboardHint = (protyle: IProtyle, textPlain: string) => {
@ -169,7 +167,6 @@ export const paste = async (protyle: IProtyle, event: (ClipboardEvent | DragEven
});
const code = processPasteCode(textHTML, textPlain);
const range = getEditorRange(protyle.wysiwyg.element);
const id = nodeElement.getAttribute("data-node-id");
// process code
if (nodeElement.getAttribute("data-type") === "NodeCodeBlock") {
// 粘贴在代码位置