debian-mirror-gitlab/app/assets/javascripts/content_editor/extensions/figure.js
2021-11-11 11:23:49 +05:30

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];
},
});