summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/content_editor/extensions/division.js
blob: c70d17009416029acf6e5b650c8e47a0652c75a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import { Node } from '@tiptap/core';
import { PARSE_HTML_PRIORITY_LOWEST } from '../constants';

export default Node.create({
  name: 'division',
  content: 'block*',
  group: 'block',
  defining: true,

  parseHTML() {
    return [{ tag: 'div', priority: PARSE_HTML_PRIORITY_LOWEST }];
  },

  renderHTML({ HTMLAttributes }) {
    return ['div', HTMLAttributes, 0];
  },
});