remirror

ProseMirror toolkit for React 🎉

MIT License

Downloads
14.7M
Stars
2.6K
Committers
81

Bot releases are hidden (Show)

remirror - v0.4.2-canary.1

Published by ifiokjr about 5 years ago

Major Changes

  • Feat: add improved types: #130

Patches

  • Fix: unstable extension order after sort: #126
  • Refactor: update sort to not mutate values: b300aadfd9afc6a3d22b80f530ab5601b0abac94
remirror - v0.4.2-canary.0

Published by ifiokjr about 5 years ago

Major Changes

  • Refactor: move paragraph to core-extensions: 3631d02ccec6a8e6cd5dde39253e1bc2796f7702

Minor Changes

  • Feat: add getExtraAttrs to the Extension class: dd08f4b19c33413de450d2e9796afd3c6f3e1c9c
  • Feat: add extraAttrs to some core-extensions: ca0da7df6b813c8c98b05f684d424574d93a0561
  • Feat: add ability to parse dom for extra attributes: #122
  • Feat: add new extensions to core extensions: d5e2d6570342e98c888fa99f08c8ba832166fd5a
  • Refactor: core-extensions: 7f23bbbe06af723da1263c341931ba3cb5079ed1
  • Feat: add new core-extensions: #124
  • Feat: add new attributes to paragraph: 8496bb37771c36dd3a97aea479f391d4449c10a2
  • Feat: new TrailingNodeExtension: f6b1cb831aa359d4dc8628e013dacb1261e5f500
  • Feat: add concept of tagging extensions: 9c31afd4fab47295080d2b8e8d4708e46aa4de7e

Patches

  • Chore: upgrade dependencies: d943a248f494aafe007b9ca54564463963b43dff
remirror - v0.4.1

Published by ifiokjr about 5 years ago

Changes

  • @remirror/showcase: Allow the ExampleWysiwygEditor to use prop suppressHydrationWarning for SSR rendering.
  • @remirror/showcase: Revert unintended renaming of ExampleTwitterEditor to ShowcaseTwitterEditor.
remirror - v0.4.0

Published by ifiokjr about 5 years ago

This is a large release with a number of breaking changes.

Added

  • 🚀 @remirror/extension-collaboration: Collaboration library added based on the brilliant example available in tiptap.

  • 🚀 @remirror/extension-mention: Mentions can now be picked up from pasting data.

  • 🚀 @remirror/extension-code-block: Add commands toggleCodeBlock, createCodeBlock, updateCodeBlock and formatCodeBlock, add keymap support for formatting, add backspace support for better navigation and other features.

  • @remirror/core: Add CommandNodeTypeParams, CommandMarkTypeParams, CommandTypeParams which is now passed to the commands method for extensions.

  • @remirror/react-utils, @remirror/react: Add suppressHydrationWarning prop to Remirror component. Set to true to ignore the hydration warning for a mismatch between the server and client content.

  • @remirror/core: Add new extensionData method to the ExtensionManager which allows the extension to provide data on every transaction which will be available for consumption in the renderProp, React Context hooks and HOC's.

  • @remirror/core: Add getActions to the params of all extension manager methods. This will throw an error if called before initialization.

  • @remirror/core: Allow extensions to override baseExtension in the RemirrorManager component.

  • @remirror/core: Add ensureTrailingParagraph as a configuration option for the paragraph node. In some scenarios, it is difficult to place a cursor after the last element. This ensures there's always space to select the position afterwards and fixes a whole range of issues. It defaults to false otherwise it breaks a lot of tests.

  • jest-prosemirror: Enable editorViewOptions for the createEditor method. For example, now it is possible to intercept transactions with the dispatchTransaction hook.

  • @remirror/renderer-react: Pass extension options through to SSR components as a prop.

  • Add internal modifier key functions for puppeteer testing.

  • Add integration editor tests for the Wysiwyg editor.

Changes

  • 💥 BREAKING @remirror/core: Change the way commands are configured. The command function on extensions now only accepts an object with the command names being globally unique. For example, the heading extension used to return a function now it returns an object with the following signature.
{
  toggleHeading(attrs?: Attrs<{level: number}>): CommandFunction;
}

This command can now be accessed via actions.toggleHeading({ level: 2 })

This is a large breaking change and may cause a lot of your existing code to stop working 😢. However, it paves the way for a better development experience, a simpler to manage library and some exciting features using type inference. Please do bear with me as I make these changes. I truly believe they'll be worthwhile.

  • 💥 BREAKING @remirror/core: Change usage isEnabled and isActive which are now methods on the command. e.g. actions.toggleHeading.isEnabled() would check whether the toggle heading button can be used at this moment.

  • 💥 BREAKING @remirror/core: Change Extension function signature actions of active and enabled.

  • 💥 BREAKING @remirror/core: Rename getEditorState to getState.

  • 💥 BREAKING @remirror/core: Change method getPortalContainer to property portalContainer on the extension manager.

  • 💥 BREAKING @remirror/extension-mention: Complete rewrite of internals and public API with better tests and more robust editing.

  • 💥 BREAKING @remirror/extension-mention: Change MentionExtension from NodeType to MarkType. Text is now editable after a mention is created.

  • 💥 BREAKING @remirror/react: Rename setChildAsRoot to childAsRoot on RemirrorContextProviderProps and all it consumers. This affects the RemirrorContextProvider, RemirrorProvider and ManagedRemirrorProvider exports. The prop now can take a boolean or the object with props to inject into the root.

  • 💥 BREAKING @remirror/react: All RemirrorProviders now require a children prop. This prevents a bug when rendering in non-dom environments.

  • 💥 BREAKING @remirror/react: dispatchTransaction has been renamed to onDispatchTransaction. It now must return a transaction and can be used to edit the transaction that will be used to create a new state.

  • 🐛 @remirror/core: Fix bug with extension manager failing to provide attributes from the extensions.

  • 🐛 @remirror/core: Fix TypeScript type of SSRComponent. Change from Component to ComponentType.

  • 🐛 @remirror/editor-twitter: Fix bug where text area didn't expand to the full height of editor container.

remirror - v0.3.0

Published by ifiokjr over 5 years ago

Added

  • @remirror/react: Add withoutEmotion which, when set to true, removes emotion (css-in-js) from the Remirror component. This is for those who don't like css-in-js and would like to work directly with the raw editor without random styles injected. Consuming the @remirror/react-components or any of the @remirror/editor-* packages will require the use of emotion.
  • @remirror/react-utils: Add oneChildOnly export which throws readable errors for invalid children props.

Changed

  • 💥 BREAKING @remirror/react-utils: Rename childIsFunction to propIsFunction and make it a pseudo predicate function (returns true when it doesn't throw an error).

  • 💥 BREAKING @remirror/editor-twitter: Rename uiTwitterTheme to TwitterEditorTheme.

  • 💥 BREAKING @remirror/core: Rename HasExtensions to ExtensionListParams.

  • 💥 BREAKING @remirror/core: Rename markActive to isMarkActive use a destructured parameters object instead of positional arguments.

  • 💥 BREAKING @remirror/core: It is now up to extensions to decide whether commands should be active when the editor is editable. isEditable method is now passed into the commands method as a means of checking.

  • 💥 BREAKING @remirror/react: All RemirrorProviders now require a children prop. This prevents a bug when rendering in non-dom environments.

  • @remirror/react: view.updateState is now called before Remirror.setState.

  • Add support for Git Large File Storage (LFS)

  • @remirror/editor-twitter, @remirror/editor-wysiwyg : Use image-snapshot testing to ensure SSR and DOM rendered editors are identical.

  • Update husky command from yarn stop:hooks and yarn start:hooks to yarn husky:stop and yarn husky:start.

Remove

  • 💥 BREAKING @remirror/react-utils @remirror/react @remirror/editor-markdown @remirror/editor-wysiwyg: Remove customRootProp from RemirrorProps.
  • 💥 BREAKING @remirror/core: Remove isEditable guard from command functions. It is now up to the command or the caller to decide if it should run when the editor is not editable. To help with this command params with the method isEditable are passed to the commands method of the extension.
  • 💥 BREAKING @remirror/core: Remove exports GetItemParamsMethod
    createFlexibleFunctionMap hasExtensionProperty extensionPropertyMapper transformExtensionMap ignoreFunctions.
remirror - v0.2.0

Published by ifiokjr over 5 years ago

Added

  • Support for server side rendering (SSR) with passing integration tests for NextJS.
  • Support for plain extension with styles impacting SSR (PlaceholderExtension can be rendered in SSR).
  • remirror/core: ssrTransformer added to extension methods as a way of wrapping and transforming the JSX element produced on the server.
  • remirror/core: SSRComponent: React.ComponentType<any> option added to MarkExtensionOptions and NodeExtensionOptions as a way of overriding the component rendered in an SSR environment.
  • remirror/core: SSRHelpersExtension added as a shorthand way of defining SSR transformations via ssrTransformer.
  • remirror/core: injectBrIntoEmptyParagraphs added for better SSR rendering.
  • remirror/react-utils: isReactFragment added to test if an element is a fragment.
  • Create better unit tests for SSR.
  • Add a changelog with changes starting from v0.1.0

Changed

  • BREAKING: Rename @remirror/ui-* packages to @remirror/editor-* for example @remirror/ui-twitter is .now called @remirror/editor-twitter.
  • BREAKING remirror/editor-twitter: Rename UITwitter and TwitterUI to TwitterEditor
  • BREAKING remirror/editor-markdown: Rename UIMarkdown and MarkdownUI to MarkdownEditor
  • BREAKING remirror/editor-wysiwyg: Rename UIWysiwyg and WysiwygUI to WysiwygEditor
  • Speed up tslint by enforcing linting on individual modules (new tsconfig.lint.json files).
  • Remove cx import from emotion library in from @remirror/core to reduce the bundle size.
  • Set @emotion/core and @emotion/styled as peer dependencies.

Remove

  • BREAKING: @remirror/ui-* packages.
remirror - v0.1.0

Published by ifiokjr over 5 years ago

Added

  • Enable remirror as a controlled component #79 #78.
  • @remirror/ui-markdown - Still in progress.
  • @remirror/extension-multicursor - this is currently just a stub (almost no code).
  • @remirror/api-documenter - will be used to generate the api documentation.

Changed

  • BREAKING: Rename all extensions to include an Extension postfix. e.g. Emoji is now EmojiExtension. This will hopefully reduce name collisions in the future.
  • Improves the puppeteer testing by separating it out from unit tests in the package.
  • Upgrade docz to v1 #65.
  • General improvements to docs.
  • Fixes missing TypeScript definitions #77.
  • Fixes crash when rendering a ReactNodeView in NextJS #75.