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/14044

Vanessaf213c55a42f9
diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss
index e0b92aaf1d..7c453faf21 100644
--- a/app/src/assets/scss/protyle/_wysiwyg.scss
+++ b/app/src/assets/scss/protyle/_wysiwyg.scss
@@ -193,6 +193,27 @@
}
}
+ &[style*="direction: rtl"] {
+ .li > .protyle-action,
+ & > .protyle-action {
+ right: 0;
+ left: auto;
+ direction: rtl;
+ }
+
+ .li > [data-node-id],
+ & > [data-node-id] {
+ margin-right: 34px;
+ margin-left: 0;
+ }
+
+ .li::before,
+ &::before {
+ right: 17px;
+ left: auto;
+ }
+ }
+
&.sb {
display: flex;
flex-direction: column;
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index b645eebf06..9864755252 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -2447,8 +2447,11 @@ data-type="fold" style="cursor:inherit;"><svg style="width: 10px${fold && fold =
let rect = element.getBoundingClientRect();
let marginHeight = 0;
if (listItem && !window.siyuan.config.editor.rtl) {
- rect = listItem.firstElementChild.getBoundingClientRect();
- space = 0;
+ const relTempRect = listItem.firstElementChild.getBoundingClientRect();
+ if (relTempRect.right <= rect.right) {
+ rect = relTempRect
+ space = 0;
+ }
} else if (nodeElement.getAttribute("data-type") === "NodeBlockQueryEmbed") {
rect = nodeElement.getBoundingClientRect();
space = 0;