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 commandstoggleCodeBlock
,createCodeBlock
,updateCodeBlock
andformatCodeBlock
, add keymap support for formatting, add backspace support for better navigation and other features. -
@remirror/core
: AddCommandNodeTypeParams
,CommandMarkTypeParams
,CommandTypeParams
which is now passed to thecommands
method for extensions. -
@remirror/react-utils
,@remirror/react
: AddsuppressHydrationWarning
prop toRemirror
component. Set to true to ignore the hydration warning for a mismatch between the server and client content. -
@remirror/core
: Add newextensionData
method to theExtensionManager
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
: AddgetActions
to the params of all extension manager methods. This will throw an error if called before initialization. -
@remirror/core
: Allow extensions to overridebaseExtension
in theRemirrorManager
component. -
@remirror/core
: AddensureTrailingParagraph
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 thecreateEditor
method. For example, now it is possible to intercept transactions with thedispatchTransaction
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 usageisEnabled
andisActive
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 ofactive
andenabled
. -
💥 BREAKING
@remirror/core
: RenamegetEditorState
togetState
. -
💥 BREAKING
@remirror/core
: Change methodgetPortalContainer
to propertyportalContainer
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
: ChangeMentionExtension
fromNodeType
toMarkType
. Text is now editable after a mention is created. -
💥 BREAKING
@remirror/react
: RenamesetChildAsRoot
tochildAsRoot
onRemirrorContextProviderProps
and all it consumers. This affects theRemirrorContextProvider
,RemirrorProvider
andManagedRemirrorProvider
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 achildren
prop. This prevents a bug when rendering in non-dom environments. -
💥 BREAKING
@remirror/react
:dispatchTransaction
has been renamed toonDispatchTransaction
. It now must return atransaction
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 fromComponent
toComponentType
. -
🐛
@remirror/editor-twitter
: Fix bug where text area didn't expand to the full height of editor container.