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
6
app/stage/protyle/js/protyle-html.js
vendored
6
app/stage/protyle/js/protyle-html.js
vendored
@ -15,7 +15,11 @@ class ProtyleHtml extends HTMLElement {
|
|||||||
if (name === 'data-content') {
|
if (name === 'data-content') {
|
||||||
const dataContent = Lute.UnEscapeHTMLStr(
|
const dataContent = Lute.UnEscapeHTMLStr(
|
||||||
this.getAttribute('data-content'))
|
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')
|
const el = document.createElement('div')
|
||||||
el.innerHTML = dataContent
|
el.innerHTML = dataContent
|
||||||
|
Loading…
Reference in New Issue
Block a user