15 lines
420 B
JavaScript
15 lines
420 B
JavaScript
import { defaultMarkdownSerializer } from '~/lib/prosemirror_markdown_serializer';
|
|
|
|
// Transforms generated HTML back to GFM for Banzai::Filter::MarkdownFilter
|
|
export default () => ({
|
|
name: 'paragraph',
|
|
schema: {
|
|
content: 'inline*',
|
|
group: 'block',
|
|
parseDOM: [{ tag: 'p' }],
|
|
toDOM: () => ['p', 0],
|
|
},
|
|
toMarkdown(state, node) {
|
|
defaultMarkdownSerializer.nodes.paragraph(state, node);
|
|
},
|
|
});
|