mirror of https://github.com/requarks/wiki
parent
5f99b30024
commit
52d0af19b4
@ -0,0 +1,8 @@
|
||||
key: htmlDiagram
|
||||
title: Diagrams Post-Processor
|
||||
description: HTML Processing for diagrams (draw.io)
|
||||
author: requarks.io
|
||||
icon: mdi-chart-multiline
|
||||
enabledDefault: true
|
||||
dependsOn: htmlCore
|
||||
props: {}
|
@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
async init($, config) {
|
||||
$(`pre.diagram`).each((idx, elm) => {
|
||||
$(elm).children('svg').each((sidx, svg) => {
|
||||
$(svg).removeAttr('content')
|
||||
})
|
||||
$(elm).replaceWith($(`<div class="diagram">${$(elm).html()}</div>`))
|
||||
})
|
||||
}
|
||||
}
|
Loading…
Reference in new issue