2019-03-02 22:35:43 +05:30
|
|
|
// Transforms generated HTML back to GFM for Banzai::Filter::MarkdownFilter
|
2022-05-07 20:08:51 +05:30
|
|
|
export default () => ({
|
|
|
|
name: 'summary',
|
|
|
|
schema: {
|
|
|
|
content: 'text*',
|
|
|
|
marks: '',
|
|
|
|
defining: true,
|
|
|
|
parseDOM: [{ tag: 'summary' }],
|
|
|
|
toDOM: () => ['summary', 0],
|
|
|
|
},
|
2019-03-02 22:35:43 +05:30
|
|
|
toMarkdown(state, node) {
|
|
|
|
state.write('<summary>');
|
|
|
|
state.text(node.textContent, false);
|
|
|
|
state.write('</summary>');
|
|
|
|
state.closeBlock(node);
|
2022-05-07 20:08:51 +05:30
|
|
|
},
|
|
|
|
});
|