Skip to content

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

:art: https://ld246.com/article/1713593768818

Vanessa428d6e189de1
diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts
index e17c052d8f..7957912845 100644
--- a/app/src/protyle/util/insertHTML.ts
+++ b/app/src/protyle/util/insertHTML.ts
@@ -168,7 +168,7 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement:
updateCellsValue(protyle, blockElement as HTMLElement, text);
} else if (cellsElement.length > 0) {
updateCellsValue(protyle, blockElement as HTMLElement, text, cellsElement);
- } else {
+ } else if (hasClosestByClassName(range.startContainer, "av__title")) {
range.insertNode(document.createTextNode(text));
range.collapse(false);
updateAVName(protyle, blockElement);
diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts
index 6b19ec5abe..e127c6f9b7 100644
--- a/app/src/protyle/wysiwyg/index.ts
+++ b/app/src/protyle/wysiwyg/index.ts
@@ -1763,7 +1763,7 @@ export class WYSIWYG {
return;
}
const blockElement = hasClosestBlock(event.target);
- if (blockElement && (!getContenteditableElement(blockElement) || hasClosestByClassName(event.target, "av__cursor"))) {
+ if (blockElement && !getContenteditableElement(blockElement)) {
event.stopPropagation();
event.preventDefault();
return;