mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-18 18:10:43 +08:00
This commit is contained in:
parent
67d95f8a78
commit
edc6ad2d50
4
app/stage/protyle/js/protyle-html.js
vendored
4
app/stage/protyle/js/protyle-html.js
vendored
@ -15,7 +15,11 @@ class ProtyleHtml extends HTMLElement {
|
||||
if (name === 'data-content') {
|
||||
const dataContent = Lute.UnEscapeHTMLStr(
|
||||
this.getAttribute('data-content'))
|
||||
if (dataContent.startsWith('<div')) {
|
||||
this.display.innerHTML = dataContent
|
||||
} else {
|
||||
this.display.innerHTML = `<div>${dataContent}</div>`
|
||||
}
|
||||
|
||||
const el = document.createElement('div')
|
||||
el.innerHTML = dataContent
|
||||
|
Loading…
Reference in New Issue
Block a user