remirror v1.0.0-next.32 Release Notes
Release Date: 2020-09-05 // over 3 years ago-
Major Changes
Minor Changes
👍
5786901c
#645 Thanks @ifiokjr! - Add support for prioritized keymaps. It's now possible to make sure that a hook which consumesuseKeymap
runs before the extension keybindings.import React from 'react';import { ExtensionPriority } from 'remirror/core';import { useKeymap } from 'remirror/react/hooks';const KeymapHook = () =\> {// Make sure this keybinding group is run first!useKeymap({ Enter: () =\> doSomething() }, ExtensionPriority.Highest);// This one we don't care about 🤷♀️useKeymap({ 'Shift-Delete': () =\> notImportant() }, ExtensionPriority.Lowest);return \<div /\>;};
0️⃣ Here is a breakdown of the default priorities when consuming keymaps.
- Hooks within
remirror/react/hooks
which consumeuseKeymap
have a priority ofExtensionPriority.High
. useKeymap
is given a priority ofExtensionPriority.Medium
.- The
createKeymap
method for extensions is given a priority ofExtensionPriority.Default
. - The
baseKeymap
which is added by default is given a priority ofExtensionPriority.Low
.
0️⃣ To change the default priority of the
createKeymap
method in a custom extension wrap theKeyBindings
return in a tuple with the priority as the first parameter.import { PlainExtension, KeyBindingsTuple, ExtensionPriority, KeyBindings } from 'remirror/core';class CustomExtension extends PlainExtension {get name() {return 'custom' as const;}createKeymap(): KeyBindingsTuple {const bindings = {Enter: () =\> return true,Backspace: () =\> return true,}return [ExtensionPriority.High, bindings];}}
aa27e968
#635 Thanks @ifiokjr! - AddonError
andstringHandler
methods to theRemirror.ManagerSettings
.⚡️
a830c70f
#633 Thanks @ifiokjr! - Makefocus
command chainable and addmanager.tr
property for creating chainable commands. This means that thefocus
method returned byuseRemirror()
can now be safely used within a controlled editor. It uses the shared chainable transaction so that the state update does not override other state updates.💅
bed5a9e3
#616 Thanks @ankon! - Optionally allow to style the currently selected textThis adds a new option for the builtin preset,
persistentSelectionClass
. If that is set to a valid CSS class name any selection in the editor will be decorated with this class.This can be used to keep an indication for the current selection even when the focus changes away from the editor.
🚚
e7b0bb0f
#641 Thanks @ifiokjr! - MoveisEmptyBlockNode
function from@remirror/extension-positioner
to@remirror/core-utils
. Re-export to prevent breaking change.55e11ba3
#634 Thanks @ifiokjr! - MakementionAtom
selectable.👀
28d1fd48
#642 Thanks @ifiokjr! - Add new signature return foruseExtension
andusePreset
. If only provided the constructor they return a the extension or preset instance from within the manager.Patch Changes
🗄
5786901c
#645 Thanks @ifiokjr! - Deprecate@remirror/react
exports forusePositioner
anduseMultiPositioner
to push adoption ofremirror/react/hooks
.5786901c
#645 Thanks @ifiokjr! - Fix broken styles for firefox as raised on discord.⚡️
28d1fd48
#642 Thanks @ifiokjr! - Fix issue withuseEmoji
,useKeymap
anduseEvents
when used together withuseRemirror({ autoUpdate: true })
causing an infinite loop.🚀
a830c70f
#633 Thanks @ifiokjr! - Fix missing version bump from last release.e7b0bb0f
#641 Thanks @ifiokjr! - Fixcommands.insertHorizontalRule
inserting the line in the wrong position.⚡️ Updated dependencies [
55e11ba3
,28d1fd48
,a830c70f
,5786901c
,e7b0bb0f
,e7b0bb0f
,28d1fd48
,aa27e968
,c8239120
,a830c70f
,5786901c
,3bf621c5
,bed5a9e3
,5786901c
]:- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- @remirror/[email protected]
- Hooks within