1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 10:16:26 +00:00

Merge branch 'master' into fix-mermaid-height

This commit is contained in:
Baptiste Augrain
2019-12-22 23:46:47 +01:00
179 changed files with 9363 additions and 4767 deletions

View File

@@ -19,7 +19,7 @@ function getId () {
return id
}
function render (element, content, theme) {
function render (element, content, theme, enableHTMLLabel) {
try {
const height = element.attributes.getNamedItem('data-height')
const isPredefined = height && height.value !== 'undefined'
@@ -30,6 +30,9 @@ function render (element, content, theme) {
mermaidAPI.initialize({
theme: isDarkTheme ? 'dark' : 'default',
themeCSS: isDarkTheme ? darkThemeStyling : '',
flowchart: {
htmlLabels: enableHTMLLabel
},
gantt: {
useWidth: element.clientWidth
}
@@ -51,6 +54,7 @@ function render (element, content, theme) {
el.setAttribute('ratio', ratio)
el.setAttribute('height', el.parentNode.clientWidth / ratio)
console.log(el)
}
})
} catch (e) {