github remirror/remirror v1.0.0-next.31

Major Changes

  • 1a7da61a #608 Thanks @ifiokjr! - 🚀 Update the onError handler with a new improved type signature for better management of errors. See the following example.

    import React from 'react';
    import { RemirrorProvider, InvalidContentHandler } from 'remirror/core';
    import { RemirrorProvider, useManager } from 'remirror/react';
    import { WysiwygPreset } from 'remirror/preset/wysiwyg';
    
    const EditorWrapper = () => {
      const onError: InvalidContentHandler = useCallback(
        ({ json, invalidContent, transformers }) => {
          // Automatically remove all invalid nodes and marks.
          return transformers.remove(json, invalidContent);
        },
        [],
      );
    
      const manager = useManager([new WysiwygPreset()]);
    
      return (
        <RemirrorProvider manager={manager} onError={onError}>
          <div />
        </RemirrorProvider>
      );
    };
    • 🚀 Add set and unset methods to @remirror/core-helpers.
    • 🚀 Add getInvalidContent export from @remirror/core-utils.
    • 🚀 Add logging support for RemirrorError for better readability.
    • 🚀 Add new ErrorConstant.INVALID_CONTENT constant for content related errors.
    • 🚀 Add Manager.createEmptyDoc() instance method for creating any empty doc (with default content) for the current schema.
    • 💥 Remove Fallback, CreateDocumentErrorHandler, getLineHeight, getPluginMeta, getPluginState, nodeNameMatchesList and setPluginMeta exports from @remirror/core-utils.
    • 💥 Rename getNearestNonTextNode function to getNearestNonTextElement.
    • 💥 Rename getNearestNonTextNode function to getNearestNonTextElement.
    • 💥 Rename StateOrTransactionParameter interface to TrStateParameter.

    General refactor of types to use the EditorSchema rather than any. If you notice any downstream issues please open an issue.

  • e8458bc5 #623 Thanks @ifiokjr! - Remove keybindings from createSuggesters and update packages to match the new prosemirror-suggest API.

  • e8458bc5 #623 Thanks @ifiokjr! - Add support for creating mentions as uneditable nodes with a new package @remirror/extension-mention-atom.

  • e8458bc5 #623 Thanks @ifiokjr! - New package @remirror/react-hooks with support for all core hooks`.

Minor Changes

  • e8458bc5 #623 Thanks @ifiokjr! - Add selectText command to CommandsExtension. Also add dispatchCommand for running custom commands to CommandsExtension.

    Fix broken command text selection in jest-remirror and improve jest-remirror type inference for the renderEditor().view property.

  • e8458bc5 #623 Thanks @ifiokjr! - Add support for using a custom schema when creating the editor.

    • Also add support for additional plugins and nodeView's via the manager settings.
  • e8458bc5 #623 Thanks @ifiokjr! - Add manager setting schema for creating a remirror manager with a custom EditorSchema. When provided this is used to bypass the default schema creation. Be aware that when this is used extraAttributes will no longer work.

Patch Changes

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

Don't miss a new remirror release

NewReleases is sending notifications on new releases.