mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
d0dc7c5ee1
no issue - Renames Cards so they comply with the `card-{{name}}` convention rather than `{{name}}-card` - Adds an unkonwnCardHandler to the editor.
12 lines
407 B
JavaScript
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>');
|
|
}
|
|
};
|