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

Vanessaedc6ad2d50e5
diff --git a/app/stage/protyle/js/protyle-html.js b/app/stage/protyle/js/protyle-html.js
index 972ddeae28..6ba4edd53c 100644
--- a/app/stage/protyle/js/protyle-html.js
+++ b/app/stage/protyle/js/protyle-html.js
@@ -15,7 +15,11 @@ class ProtyleHtml extends HTMLElement {
if (name === 'data-content') {
const dataContent = Lute.UnEscapeHTMLStr(
this.getAttribute('data-content'))
- this.display.innerHTML = dataContent
+ if (dataContent.startsWith('<div')) {
+ this.display.innerHTML = dataContent
+ } else {
+ this.display.innerHTML = `<div>${dataContent}</div>`
+ }
const el = document.createElement('div')
el.innerHTML = dataContent