github remirror/remirror v1.0.0-next.33

Major Changes

  • 92ed413: BREAKING: 💥 Remove export of useSetState and use default useState instead.

Minor Changes

  • 7a34e15: Add support for returning a Dispose method from the onCreate and onView lifecycle methods for automatic cleanup in the onDestroy handler.

  • 7a34e15: Add support for early return handler predicate checks. Now it's possible to use a function to check if the value received from a handler should trigger an early return.

  • 7a34e15: Update return signature of getMarkRange from @remirror/core-utils to also include the mark found. Additionally, to better support optional chaining it now returns undefined instead of false when no range can be found.

  • 7a34e15: Add invalidMarks support.

    • Add the ability to disable all input rules if a certain mark is active.
    • Fix the ItalicExtension regex which was over eager.
    • Expose decorationSet for the prosemirror-suggest state.
    • Export markActiveInRange, rangeHasMarks, positionHasMarks from prosemirror-suggest.
    • Add helpers getMarksByTags and getNodesByTags to the TagsExtension.
  • 7a34e15: Add new properties chain, commands and helpers to simplify usage of commands and helpers within extensions. Also allow using setExtensionStore within the onView lifecycle handler, which previously was prevented.

    Deprecate getCommands, getChain and getHelpers methods on the Remirror.ExtensionStore interface. They will be removed in a future release.

  • 7a34e15: Add priority parameter to the addHandler method. Now hooks which consume the addHandler methods can alter the priority with which they will be run.

  • 525ac3d: Add AcceptUndefined annotation which allows options to accept undefined as their default value.

  • 7a34e15: Add isSuggesterActive helper to the SuggestExtension.

  • 7a34e15: Enable disabling input rules with a shouldSkip method. This is now available as a handler for the InputRulesExtension via shouldSkipInputRule.

    Consuming this API looks something like this.

    import { PlainExtension, Dispose } from 'remirror/core';
    class CoolExtension extends PlainExtension {
      get name() {
        return 'cool';
      onCreate(): Dispose {
        // Add the `shouldSkip` predicate check to this extension.
        return'shouldSkipInputRule', () => {
          if (something) {
            return true;
          return false;
  • 7a34e15: Add getExtension and getPreset methods to the Remirror.ExtensionStore.

  • d47bd78: 🎉 Brings support for adding extra attributes to the RemirrorManager via extension tags. Attributes can now be added to all nodes and marks with a specific tag like ExtensionTag.Alignment or ExtensionTag.NodeBlock. Every matching tag in the Schema receives the extra attributes defined.

    With tags, you can select a specific sub selection of marks and nodes. This will be the basis for adding advanced formatting to remirror.

    import { ExtensionTag } from 'remirror/core';
    import { createCoreManager, CorePreset } from 'remirror/preset/core';
    import { WysiwygPreset } from 'remirror/preset/wysiwyg';
    const manager = createCoreManager(() => [new WysiwygPreset(), new CorePreset()], {
      extraAttributes: [
          identifiers: {
            tags: [ExtensionTag.NodeBlock],
            // Can be limited by type to `node | mark`.
            type: 'node',
          attributes: { role: 'presentation' },

    Each item in the tags array should be read as an OR so the following would match Tag1 OR Tag2 OR Tag3.

    { "tags": ["Tag1", "Tag2", "Tag3"] }

    The type property (mark | node) is exclusive and limits the type of matches that will be matched.

  • 92ed413: Add new AnchorHeadParameter export and make it a part of PrimitiveSelection type.

  • 7a34e15: Skip input rules when the mention is active or one of the included suggester names are active.

  • 7a34e15: Add forwardDelete to jest-remirror and jest-prosemirror.

  • 92ed413: Add support for anchor and head cursors when writing tests. Also fix selectText when position is 0.

  • 7a34e15: Multiple improvements to the prosemirror-suggest implementation.

    Add support for setting a function to determine whether decorations should be ignored. ShouldDisableDecorations takes the current state and the active match and returns true when decorations should be disabled.

    Add support for checkNextValidSelection which is called for all suggesters to provide the opportunity to peek forward into the next valid text selection and decide whether or not any action should be taken. This is used in the @remirror/extension-mention to fix #639.

    Add option emptySelectionsOnly to prevent matches when the text selection is not empty.

    Prevent non-text selection from triggering matches.

    Adds missing range check to invalidMarks tests.

Patch Changes

  • 92ed413: Fix editable mentions support for exiting when text is selected. Also update getSelection to support anchor and head selections.

  • 7a34e15: Fix forward deleting when using the @remirror/extension-mention #639.

  • 04378b5: Fix text selection causing range error when creating table.

  • Updated dependencies [7a34e15]

  • Updated dependencies [7a34e15]

  • Updated dependencies [04378b5]

  • Updated dependencies [92ed413]

  • Updated dependencies [7a34e15]

  • Updated dependencies [7a34e15]

  • Updated dependencies [7a34e15]

  • Updated dependencies [7a34e15]

  • Updated dependencies [7a34e15]

  • Updated dependencies [525ac3d]

  • Updated dependencies [7a34e15]

  • Updated dependencies [7a34e15]

  • Updated dependencies [7a34e15]

  • Updated dependencies [7a34e15]

  • Updated dependencies [92ed413]

  • Updated dependencies [d47bd78]

  • Updated dependencies [92ed413]

    • @remirror/extension-mention@1.0.0-next.33
    • @remirror/core@1.0.0-next.33
    • @remirror/preset-table@1.0.0-next.33
    • @remirror/core-utils@1.0.0-next.33
    • @remirror/core-constants@1.0.0-next.33
    • @remirror/extension-italic@1.0.0-next.33
    • @remirror/core-types@1.0.0-next.33
    • @remirror/extension-history@1.0.0-next.33
    • @remirror/react@1.0.0-next.33
    • @remirror/react-hooks@1.0.0-next.33
    • @remirror/preset-social@1.0.0-next.33
    • @remirror/react-social@1.0.0-next.33
    • @remirror/dom@1.0.0-next.33
    • @remirror/extension-annotation@1.0.0-next.33
    • @remirror/extension-auto-link@1.0.0-next.33
    • @remirror/extension-bidi@1.0.0-next.33
    • @remirror/extension-blockquote@1.0.0-next.33
    • @remirror/extension-bold@1.0.0-next.33
    • @remirror/extension-code@1.0.0-next.33
    • @remirror/extension-code-block@1.0.0-next.33
    • @remirror/extension-collaboration@1.0.0-next.33
    • @remirror/extension-diff@1.0.0-next.33
    • @remirror/extension-doc@1.0.0-next.33
    • @remirror/extension-drop-cursor@1.0.0-next.33
    • @remirror/extension-emoji@1.0.0-next.33
    • @remirror/extension-epic-mode@1.0.0-next.33
    • @remirror/extension-events@1.0.0-next.33
    • @remirror/extension-gap-cursor@1.0.0-next.33
    • @remirror/extension-hard-break@1.0.0-next.33
    • @remirror/extension-heading@1.0.0-next.33
    • @remirror/extension-horizontal-rule@1.0.0-next.33
    • @remirror/extension-image@1.0.0-next.33
    • @remirror/extension-link@1.0.0-next.33
    • @remirror/extension-mention-atom@1.0.0-next.33
    • @remirror/extension-paragraph@1.0.0-next.33
    • @remirror/extension-placeholder@1.0.0-next.33
    • @remirror/extension-position-tracker@1.0.0-next.33
    • @remirror/extension-positioner@1.0.0-next.33
    • @remirror/extension-react-component@1.0.0-next.33
    • @remirror/extension-react-ssr@1.0.0-next.33
    • @remirror/extension-search@1.0.0-next.33
    • @remirror/extension-strike@1.0.0-next.33
    • @remirror/extension-text@1.0.0-next.33
    • @remirror/extension-trailing-node@1.0.0-next.33
    • @remirror/extension-underline@1.0.0-next.33
    • @remirror/extension-yjs@1.0.0-next.33
    • @remirror/preset-core@1.0.0-next.33
    • @remirror/preset-embed@1.0.0-next.33
    • @remirror/preset-list@1.0.0-next.33
    • @remirror/preset-react@1.0.0-next.33
    • @remirror/preset-wysiwyg@1.0.0-next.33
    • @remirror/react-wysiwyg@1.0.0-next.33
    • @remirror/core-helpers@1.0.0-next.33
    • @remirror/react-utils@1.0.0-next.33
    • @remirror/theme@1.0.0-next.33

Don't miss a new remirror release

NewReleases is sending notifications on new releases.