mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 11:34:24 +03:00
0833b28557
refs https://github.com/TryGhost/Ghost/issues/9311
- match card names to the new generic Koenig card names introduced in 95a068615d
20 lines
623 B
JavaScript
20 lines
623 B
JavaScript
module.exports = {
|
|
name: 'markdown',
|
|
type: 'dom',
|
|
render: function (opts) {
|
|
var converters = require('../converters'),
|
|
html, element;
|
|
|
|
// convert markdown to HTML ready for insertion into dom
|
|
html = '<div class="kg-card-markdown">'
|
|
+ converters.markdownConverter.render(opts.payload.markdown || '')
|
|
+ '</div>';
|
|
|
|
// use the SimpleDOM document to create a raw HTML section.
|
|
// avoids parsing/rendering of potentially broken or unsupported HTML
|
|
element = opts.env.dom.createRawHTMLSection(html);
|
|
|
|
return element;
|
|
}
|
|
};
|