An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: https://github.com/siyuan-note/siyuan/pull/14010
Vanessac06f740c1c82
diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scssindex ade1740cde..f594aa951d 100644--- a/app/src/assets/scss/protyle/_wysiwyg.scss+++ b/app/src/assets/scss/protyle/_wysiwyg.scss@@ -511,7 +511,7 @@transition: var(--b3-background-transition);}- &--hidden ::selection {+ &--hiderange ::selection {background-color: transparent;}diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.tsindex 456ba5f822..ea3951e406 100644--- a/app/src/protyle/wysiwyg/index.ts+++ b/app/src/protyle/wysiwyg/index.ts@@ -440,6 +440,7 @@ export class WYSIWYG {});this.element.addEventListener("mousedown", (event: MouseEvent) => {+ protyle.wysiwyg.element.classList.remove("protyle-wysiwyg--hiderange");if (event.button === 2 || window.siyuan.ctrlIsPressed) {// 右键return;@@ -729,7 +730,6 @@ export class WYSIWYG {tableBlockElement = hasClosestBlock(target);if (tableBlockElement) {tableBlockElement.querySelector(".table__select").removeAttribute("style");- tableBlockElement.classList.remove("protyle-wysiwyg--hidden");window.siyuan.menus.menu.remove();event.stopPropagation();}@@ -811,9 +811,15 @@ export class WYSIWYG {// table cell selectif (!protyle.disabled && tableBlockElement && tableBlockElement.contains(moveTarget) &&!hasClosestByClassName(tableBlockElement, "protyle-wysiwyg__embed")) {+ if (moveTarget.classList.contains("table__select")) {+ moveTarget.classList.add("fn__none");+ const pointElement = document.elementFromPoint(moveEvent.clientX, moveEvent.clientY);+ moveTarget.classList.remove("fn__none");+ moveTarget = hasClosestByMatchTag(pointElement, "TH") || hasClosestByMatchTag(pointElement, "TD");+ }if (moveTarget && moveTarget.isSameNode(target)) {tableBlockElement.querySelector(".table__select").removeAttribute("style");- tableBlockElement.classList.remove("protyle-wysiwyg--hidden");+ protyle.wysiwyg.element.classList.remove("protyle-wysiwyg--hiderange");moveCellElement = moveTarget;return false;}@@ -871,8 +877,8 @@ export class WYSIWYG {width = item.offsetLeft + item.clientWidth - left;}});- tableBlockElement.classList.add("protyle-wysiwyg--hidden");- tableBlockElement.querySelector(".table__select").setAttribute("style", `left:${left - tableBlockElement.firstElementChild.scrollLeft}px;top:${top}px;height:${height}px;width:${width + 1}px;pointer-events:none;`);+ protyle.wysiwyg.element.classList.add("protyle-wysiwyg--hiderange");+ tableBlockElement.querySelector(".table__select").setAttribute("style", `left:${left - tableBlockElement.firstElementChild.scrollLeft}px;top:${top}px;height:${height}px;width:${width + 1}px;`);moveCellElement = moveTarget;}return;@@ -1049,12 +1055,13 @@ export class WYSIWYG {if (moveEvent.clientY <= y && !endLastElement) {endLastElement = selectElements[selectElements.length - 1];}- if (selectElements.length === 1 && !selectElements[0].classList.contains("list") && !selectElements[0].classList.contains("bq") && !selectElements[0].classList.contains("sb")) {- protyle.wysiwyg.element.classList.remove("protyle-wysiwyg--hidden");+ if (selectElements.length === 1 && !selectElements[0].classList.contains("list") &&+ !selectElements[0].classList.contains("bq") && !selectElements[0].classList.contains("sb")) {// 只有一个 p 时不选中protyle.selectElement.style.backgroundColor = "transparent";+ protyle.wysiwyg.element.classList.remove("protyle-wysiwyg--hiderange");} else {- protyle.wysiwyg.element.classList.add("protyle-wysiwyg--hidden");+ protyle.wysiwyg.element.classList.add("protyle-wysiwyg--hiderange");selectElements.forEach(item => {if (!hasClosestByClassName(item, "protyle-wysiwyg__embed")) {item.classList.add("protyle-wysiwyg--select");@@ -2181,7 +2188,6 @@ export class WYSIWYG {this.preventClick = false;return;}- protyle.wysiwyg.element.classList.remove("protyle-wysiwyg--hidden");protyle.app.plugins.forEach(item => {item.eventBus.emit("click-editorcontent", {protyle,