Skip to content

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

:art: fix https://github.com/siyuan-note/siyuan/issues/10900

Vanessa1f5d93232e92
diff --git a/app/src/protyle/gutter/index.ts b/app/src/protyle/gutter/index.ts
index 32c42f9580..b0cec7d52f 100644
--- a/app/src/protyle/gutter/index.ts
+++ b/app/src/protyle/gutter/index.ts
@@ -101,10 +101,12 @@ export class Gutter {
const ghostElement = document.createElement("div");
ghostElement.className = protyle.wysiwyg.element.className;
selectElements.forEach(item => {
- if (item.getAttribute("data-type") === "NodeIFrame") {
+ const type = item.getAttribute("data-type");
+ if (["NodeIFrame", "NodeWidget"].includes(type)) {
const embedElement = genEmptyElement();
embedElement.classList.add("protyle-wysiwyg--select");
- getContenteditableElement(embedElement).innerHTML = "<svg class=\"svg\"><use xlink:href=\"#iconLanguage\"></use></svg> IFrame";
+ const isIFrame = type === "NodeIFrame";
+ getContenteditableElement(embedElement).innerHTML = `<svg class="svg"><use xlink:href="#icon${isIFrame ? "Language" : "Both"}"></use></svg> ${isIFrame ? "IFrame" : window.siyuan.languages.widget}`;
ghostElement.append(embedElement);
} else {
ghostElement.append(item.cloneNode(true));