gitlab-org--gitlab-foss/app/assets/javascripts/content_editor/extensions/figure.js

16 lines
283 B
JavaScript

import { Node } from '@tiptap/core';
export default Node.create({
name: 'figure',
content: 'block+',
group: 'block',
defining: true,
parseHTML() {
return [{ tag: 'figure' }];
},
renderHTML({ HTMLAttributes }) {
return ['figure', HTMLAttributes, 0];
},
});