0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-10 23:36:14 -05:00
ghost/core/server/lib/mobiledoc/cards/html.js

16 lines
412 B
JavaScript
Raw Normal View History

'use strict';
module.exports = {
name: 'card-html',
type: 'dom',
render(opts) {
let html = `<div class="kg-card-html">${opts.payload.html}</div>`;
// use the SimpleDOM document to create a raw HTML section.
// avoids parsing/rendering of potentially broken or unsupported HTML
let element = opts.env.dom.createRawHTMLSection(html);
return element;
}
};