17 lines
429 B
JavaScript
17 lines
429 B
JavaScript
// Transforms generated HTML back to GFM for Banzai::Filter::MarkdownFilter
|
|
export default () => ({
|
|
name: 'summary',
|
|
schema: {
|
|
content: 'text*',
|
|
marks: '',
|
|
defining: true,
|
|
parseDOM: [{ tag: 'summary' }],
|
|
toDOM: () => ['summary', 0],
|
|
},
|
|
toMarkdown(state, node) {
|
|
state.write('<summary>');
|
|
state.text(node.textContent, false);
|
|
state.write('</summary>');
|
|
state.closeBlock(node);
|
|
},
|
|
});
|