debian-mirror-gitlab/app/assets/javascripts/behaviors/markdown/nodes/table.js

16 lines
374 B
JavaScript
Raw Normal View History

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: 'table',
schema: {
content: 'table_head table_body',
group: 'block',
isolating: true,
parseDOM: [{ tag: 'table' }],
toDOM: () => ['table', 0],
},
2019-03-02 22:35:43 +05:30
toMarkdown(state, node) {
state.renderContent(node);
state.closeBlock(node);
2022-05-07 20:08:51 +05:30
},
});