github ianstormtaylor/slate slate-react@0.76.0

latest releases: slate-react@0.104.0, slate@0.103.0, slate-react@0.102.0...
2 years ago

Minor Changes

  • #4873 20acca4b Thanks @bryanph! - A different behavior for inserting a soft break with shift+enter is quite common in rich text editors. Right now you have to do this in onKeyDown which is not so nice. This adds a separate insertSoftBreak method on the editor instance that gets called when a soft break is inserted. This maintains the current default behavior for backwards compatibility (it just splits the block). But at least you can easily overwrite it now.

    If you rely on overwriting editor.insertBreak for extra behavior for soft breaks this might be a breaking change for you and you should overwrite editor.insertSoftBreak instead.

Patch Changes

  • #4901 5ef346fe Thanks @bryanph! - Fixes a bug where nodes remounted on split_node and merge_node

  • #4885 07669dca Thanks @ryanmitts! - toSlatePoint should not consider a selection within a void node if the void node isn't in the editor itself.

    Prior to this fix, a nested Slate editor inside a void node in a parent editor would not allow you to start typing text in a blank editor state correctly. After the first character insertion, the selection would jump back to the start of the nested editor.

  • #4910 2a8d86f1 Thanks @jasonphillips! - Fix decorations applied across nested elements

Don't miss a new slate release

NewReleases is sending notifications on new releases.