0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server/apps/default-cards/cards/html.js
Ryan McCarvill d0dc7c5ee1 📦 Card-Rename (#8218)
no issue
- Renames Cards so they comply with the `card-{{name}}` convention rather than `{{name}}-card`
- Adds an unkonwnCardHandler to the editor.
2017-03-24 10:03:33 +00:00

12 lines
407 B
JavaScript

var SimpleDom = require('simple-dom'),
tokenizer = require('simple-html-tokenizer').tokenize,
parser;
module.exports = {
name: 'card-html',
type: 'dom',
render(opts) {
parser = new SimpleDom.HTMLParser(tokenizer, opts.env.dom, SimpleDom.voidMap);
return parser.parse('<div class="kg-card-html">' + opts.payload.html + '</div>');
}
};