debian-mirror-gitlab/app/assets/javascripts/content_editor/extensions/figure.js

17 lines
283 B
JavaScript
Raw Normal View History

2021-11-11 11:23:49 +05:30
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];
},
});