Add Markdown capability globally (#1965)

* add markdown capability globally

* add markdown to site description

* add showdown to package.json

remove it from vendor.json, its bundled

* formatting

* io

* Update lnbits/core/templates/core/index.html

---------

Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Tiago Vasconcelos
2023-09-27 11:32:03 +01:00
committed by GitHub
co-authored by dni ⚡
parent 5c5dd98af2
commit 52608c4ffc
11 changed files with 5231 additions and 27 deletions
+6
View File
@@ -357,6 +357,12 @@ window.LNbits = {
icon: null
})
}
},
convertMarkdown(text) {
const converter = new showdown.Converter()
converter.setFlavor('github')
converter.setOption('simpleLineBreaks', true)
return converter.makeHtml(text)
}
}
}