mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-27 20:08:49 +01:00
This commit is contained in:
parent
67d95f8a78
commit
edc6ad2d50
1 changed files with 5 additions and 1 deletions
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') {
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue