How to use the @remirror/core-constants.NodeGroup.Block function in @remirror/core-constants

To help you get started, we’ve selected a few @remirror/core-constants examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ifiokjr / remirror / @remirror / core / src / __tests__ / node-extension.spec.ts View on Github external
get schema(): NodeExtensionSpec {
    return {
      content: 'inline*',
      group: NodeGroup.Block,
      attrs: this.extraAttrs(),
      draggable: false,
      parseDOM: [
        {
          tag: 'p',
          getAttrs: node => this.getExtraAttrs(node as Element),
        },
      ],
      toDOM: () => ['p', 0],
    };
  }
}
github ifiokjr / remirror / packages / jest-prosemirror / src / jest-prosemirror-schema.ts View on Github external
group: 'inline',
  atom: true,
  selectable: true,
  parseDOM: [
    {
      tag: 'span[data-node-type="atomInline"]',
    },
  ],
  toDOM: () => {
    return ['span', { 'data-node-type': 'atomInline' }];
  },
};

const atomBlock: NodeSpec = {
  inline: false,
  group: NodeGroup.Block,
  atom: true,
  selectable: true,
  parseDOM: [
    {
      tag: 'div[data-node-type="atomBlock"]',
    },
  ],
  toDOM: () => {
    return ['div', { 'data-node-type': 'atomBlock' }];
  },
};

const atomContainer: NodeSpec = {
  inline: false,
  group: NodeGroup.Block,
  content: 'atomBlock+',
github ifiokjr / remirror / packages / jest-prosemirror / src / jest-prosemirror-schema.ts View on Github external
group: NodeGroup.Block,
  atom: true,
  selectable: true,
  parseDOM: [
    {
      tag: 'div[data-node-type="atomBlock"]',
    },
  ],
  toDOM: () => {
    return ['div', { 'data-node-type': 'atomBlock' }];
  },
};

const atomContainer: NodeSpec = {
  inline: false,
  group: NodeGroup.Block,
  content: 'atomBlock+',
  parseDOM: [
    {
      tag: 'div[data-node-type="atomBlockContainer"]',
    },
  ],
  toDOM: () => {
    return ['div', { 'data-node-type': 'atomBlockContainer' }];
  },
};

const containerWithRestrictedContent: NodeSpec = {
  inline: false,
  group: NodeGroup.Block,
  content: 'paragraph+',
  parseDOM: [