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

Vanessa4f7489212e84
diff --git a/app/src/assets/scss/component/_typography.scss b/app/src/assets/scss/component/_typography.scss
index 8c9f2893e1..e957933fd3 100644
--- a/app/src/assets/scss/component/_typography.scss
+++ b/app/src/assets/scss/component/_typography.scss
@@ -406,8 +406,8 @@
text-align: center;
}
- [data-subtype="NodeIFrame"],
- [data-subtype="widget"] {
+ [data-type="NodeIFrame"],
+ [data-type="NodeWidget"] {
height: 256px;
width: 100%;
diff --git a/app/src/assets/scss/protyle/_wysiwyg.scss b/app/src/assets/scss/protyle/_wysiwyg.scss
index 539eeb8983..ace850aca3 100644
--- a/app/src/assets/scss/protyle/_wysiwyg.scss
+++ b/app/src/assets/scss/protyle/_wysiwyg.scss
@@ -508,9 +508,11 @@
&.iframe {
// https://ld246.com/article/1644827326901
// https://github.com/siyuan-note/siyuan/issues/4172
- &[data-type="NodeWidget"] .iframe-content,
- &[data-type="NodeIFrame"] .iframe-content {
- -webkit-user-modify: read-only;
+ &[data-type="NodeWidget"],
+ &[data-type="NodeIFrame"] {
+ .iframe-content {
+ -webkit-user-modify: read-only;
+ }
}
&--drag {
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index 28a2622595..6dd37ecd84 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -2102,7 +2102,7 @@ export class Gutter {
this.genClick(nodeElements, protyle, (e: HTMLElement) => {
if (e.classList.contains("av")) {
e.style.justifyContent = "";
- } else if (["NodeIFrame", "widget"].includes(e.getAttribute("data-subtype"))) {
+ } else if (["NodeIFrame", "NodeWidget"].includes(e.getAttribute("data-type"))) {
e.style.margin = "";
} else {
e.style.textAlign = "left";
@@ -2118,7 +2118,7 @@ export class Gutter {
this.genClick(nodeElements, protyle, (e: HTMLElement) => {
if (e.classList.contains("av")) {
e.style.justifyContent = "center";
- } else if (["NodeIFrame", "widget"].includes(e.getAttribute("data-subtype"))) {
+ } else if (["NodeIFrame", "NodeWidget"].includes(e.getAttribute("data-type"))) {
e.style.margin = "0 auto";
} else {
e.style.textAlign = "center";
@@ -2134,7 +2134,7 @@ export class Gutter {
this.genClick(nodeElements, protyle, (e: HTMLElement) => {
if (e.classList.contains("av")) {
e.style.justifyContent = "flex-end";
- } else if (["NodeIFrame", "widget"].includes(e.getAttribute("data-subtype"))) {
+ } else if (["NodeIFrame", "NodeWidget"].includes(e.getAttribute("data-type"))) {
e.style.margin = "0 0 0 auto";
} else {
e.style.textAlign = "right";
@@ -2186,7 +2186,7 @@ export class Gutter {
this.genClick(nodeElements, protyle, (e: HTMLElement) => {
if (e.classList.contains("av")) {
e.style.justifyContent = "";
- } else if (["NodeIFrame", "widget"].includes(e.getAttribute("data-subtype"))) {
+ } else if (["NodeIFrame", "NodeWidget"].includes(e.getAttribute("data-type"))) {
e.style.margin = "";
} else {
e.style.textAlign = "";