How to use the @remirror/core-constants.MarkGroup.Indentation 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 / extension-manager.helpers.ts View on Github external
>(
  extensions: AnyExtension[],
): ExtensionTags => {
  const general: GeneralExtensionTags = {
    [Tags.FormattingMark]: [],
    [Tags.FormattingNode]: [],
    [Tags.LastNodeCompatible]: [],
    [Tags.NodeCursor]: [],
  };

  const mark: MarkExtensionTags = {
    [MarkGroup.Alignment]: [],
    [MarkGroup.Behavior]: [],
    [MarkGroup.Color]: [],
    [MarkGroup.FontStyle]: [],
    [MarkGroup.Indentation]: [],
    [MarkGroup.Link]: [],
    [MarkGroup.Code]: [],
  };

  const node: NodeExtensionTags = { [NodeGroup.Block]: [], [NodeGroup.Inline]: [] };

  for (const extension of extensions) {
    if (isNodeExtension(extension)) {
      const group = extension.schema.group as NodeGroup;
      node[group] = isUndefined(node[group])
        ? [extension.name as GNodes]
        : [...node[group], extension.name as GNodes];
    } else if (isMarkExtension(extension)) {
      const group = extension.schema.group as MarkGroup;
      mark[group] = isUndefined(mark[group])
        ? [extension.name as GMarks]