Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/10805

Vanessacfe93a0acc92
diff --git a/app/src/protyle/wysiwyg/enter.ts b/app/src/protyle/wysiwyg/enter.ts
index a7567e8e0a..e8ae88dacf 100644
--- a/app/src/protyle/wysiwyg/enter.ts
+++ b/app/src/protyle/wysiwyg/enter.ts
@@ -17,8 +17,12 @@ import {isIPad, setStorageVal} from "../util/compatibility";
import {mathRender} from "../render/mathRender";
import {isMobile} from "../../util/functions";
import {processRender} from "../util/processCode";
+import {hasClosestByClassName} from "../util/hasClosest";
export const enter = (blockElement: HTMLElement, range: Range, protyle: IProtyle) => {
+ if (hasClosestByClassName(blockElement, "protyle-wysiwyg__embed")) {
+ return;
+ }
const disableElement = isNotEditBlock(blockElement);
if (!disableElement && blockElement.classList.contains("protyle-wysiwyg--select")) {
setLastNodeRange(getContenteditableElement(blockElement), range, false);