Skip to content

Latest commit

 

History

History
747 lines (394 loc) · 55.8 KB

CHANGELOG.md

File metadata and controls

747 lines (394 loc) · 55.8 KB

slate-react

0.91.11

Patch Changes

  • #5362 43999356 Thanks @jason0x43! - Fix an issue where pastes in Safari wouldn't include application/x-slate-fragment data
  • #5359 9825d29b Thanks @jason0x43! - Fix an issue on Android where content containing a newline wouldn't be pasted properly

0.91.10

Patch Changes

  • #5346 a5e833f6 Thanks @edhager! - Fix a problem with Editable not calling the decorate function passed as a prop when it should.
  • #5343 f7f02a8b Thanks @12joan! - Fix error when triple-clicking a word preceding a contenteditable="false" DOM node in Chrome

0.91.9

Patch Changes

  • #5339 62f8ddd9 Thanks @12joan! - Fixes #5335. To prevent performance issues, make sure to wrap custom renderPlaceholder values in useCallback.

0.91.8

Patch Changes

  • #5325 af3f828b Thanks @clauderic! - Fix edge-cases in the Android input manager when text leaf nodes are deleted, such as when deleting text leaf nodes adjacent to inline void nodes.
  • #5327 4205e0f0 Thanks @YasinChan! - Fix the issue of composition API and beforeinput event triggering between Chrome versions 60-75 on the Android platform.

0.91.7

Patch Changes

0.91.6

Patch Changes

  • #5315 5784a38b Thanks @clauderic! - The RestoreDOM manager that is used Android no longer restores the DOM to its previous state for text mutations. This allows the editor state to be reconciled during a composition without interrupting the composition, as programatically updating the textContent of a text node ends the current composition.
  • #5315 5784a38b Thanks @clauderic! - Fixed consumer defined onInput event handler not being invoked when passed to the <Editable> component.

0.91.5

Patch Changes

  • #5306 213edbbf Thanks @clauderic! - Use memoization to avoid unnecessary textContent updates in <TextString> component.

0.91.4

Patch Changes

  • #5310 b94254d6 Thanks @etrepum! - Fix to ensure that the latest versions of onChange and renderPlaceholder are used

0.91.3

Patch Changes

0.91.2

Patch Changes

  • #5297 967d99eb Thanks @edhager! - Fix memory leaks by adding clean-up code that looks for ref resets in Editable and Text.

0.91.1

Patch Changes

0.91.0

Minor Changes

  • #5271 9635b992 Thanks @dsvgit! - If TextComponent decorations keep the same offsets and only paths are changed, prevent re-rendering because only decoration offsets matter when leaves are calculated.

0.90.0

Minor Changes

0.89.0

Minor Changes

Patch Changes

  • #5265 3cf51f4d Thanks @kylemclean! - Improve compatibility for browsers that do not support ResizeObserver or :where selector

0.88.2

Patch Changes

  • #5252 179d5c92 Thanks @frellica! - remove qq browser from beforeinput compat list because it had updated its chromium core to version 94

0.88.0

Minor Changes

  • #5226 0141f683 Thanks @laufeyrut! - Check if getBoundingClientRect exist before trying to call bind on it. Makes unit testing experience agains Editable nicer

0.87.1

Patch Changes

0.87.0

Minor Changes

0.86.0

Minor Changes

0.83.2

Patch Changes

0.83.1

Patch Changes

0.83.0

Minor Changes

  • #5123 0eb37e79 Thanks @laufeyrut! - Make it possible to delete block elements with backspace in Chrome and Safari

Patch Changes

0.82.2

Patch Changes

  • #5105 55b95740 Thanks @yume-chan! - Change Element component to use callback-style ref to reliably track DOM node of rendered custom elements

0.82.1

Patch Changes

  • #5084 50de780b Thanks @BitPhinix! - Fix selection handling with slow flush in mark placeholders on android, fix auto-capitalize after placeholder

0.82.0

Minor Changes

  • #5041 9bc0b613 Thanks @bryanph! - - Introduces a useSlateSelection hook that triggers whenever the selection changes.
    • This also changes the implementation of SlateContext to use an incrementing value instead of an array replace to trigger updates
    • Introduces a useSlateWithV hook that includes the version counter which can be used to prevent re-renders
  • #4988 fbab6331 Thanks @BitPhinix! - Android input handling rewrite, replace composition insert prefixes with decoration based mark placeholders

0.81.3

Patch Changes

  • #5054 1cc0797f Thanks @BitPhinix! - Fix toSlatePoint in void nodes with nested editors if children are rendered as the last child

0.81.2

Patch Changes

0.81.0

Minor Changes

  • #4999 fe13a8f9 Thanks @alexandercampbell! - Add new Slate.Scrubber interface to allow scrubbing end user data from exception text. The default behavior remains unchanged.

0.80.0

Patch Changes

0.79.0

Minor Changes

0.78.1

Patch Changes

0.77.4

Patch Changes

0.77.3

Patch Changes

0.77.2

Patch Changes

0.77.1

Patch Changes

0.77.0

Minor Changes

Patch Changes

0.76.1

Patch Changes

0.76.0

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

  • #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.

0.75.0

Minor Changes

0.74.2

Patch Changes

0.74.1

Patch Changes

0.74.0

Minor Changes

  • #4841 47f2403e Thanks @Fibs7000! - Added redux-style useSlateSelector to improve and prevent unneccessary rerendering with the useSlate hook

0.73.0

Patch Changes

0.72.9

Patch Changes

  • #4828 d5ac8237 Thanks @BitPhinix! - Reset isDraggingInternally onDragEnd and onDrop even if the event is handled by the editable handler
  • #4819 80661509 Thanks @ugaya40! - Fix a possible update of react state after Slate component is unmounted

0.72.8

Patch Changes

0.72.7

Patch Changes

  • #4813 a5fd62dd Thanks @BitPhinix! - Don't throw in toSlatePoint while using supressThrow if leaf has no text node

0.72.6

Patch Changes

0.72.5

Patch Changes

  • #4749 a3dfb151 Thanks @Jabher! - Fix "cannot resolve DOM point" error when switching between multiple errors

0.72.4

Patch Changes

  • #4779 345b8fc9 Thanks @alessiogaldy! - Android editable updates

    • Remove logic to delay handling of text insertion
    • Call Transforms.setSelection before Editor.insertText to adjust position
  • #4786 67aa1f10 Thanks @alessiogaldy! - - Restore logic to delay text insertion on android
    • Always call Trasform.setSelection before calling Editor.insertText

0.72.2

Patch Changes

  • #4734 3c07a870 Thanks @YasinChan! - [AndroidEditor] Solve input association problems and add click events.
  • #4733 ccafb69 Thanks @Schipy! - Optimize TextString rendering to support browser/OS text features, e.g. fix native spellcheck.

0.72.1

Patch Changes

  • #4720 1217021a Thanks @bryanph! - Add origin event type to setFragmentData to be able to distinguish copy, cut and drag
  • #4727 0334851c Thanks @ahoisl! - Fix "Cannot resolve from DOM point" error on onDomSelectionChange for readonly void elements

0.72.0

Minor Changes

Patch Changes

0.71.0

Minor Changes

  • #4682 e5380655 Thanks @matthewkeil! - Support SSR for autoCorrect, spellCheck and autoCapitalize. Fixes prop mismatch between server and client. Removes the need to add

0.70.2

Patch Changes

0.70.1

Patch Changes

0.70.0

Patch Changes

0.69.0

Minor Changes

  • #4625 e54f2a0e Thanks @echarles! - insertTextData and insertFragmentData return a boolean (true if some content has been effectively inserted)

0.68.1

Patch Changes

0.68.0

Minor Changes

0.67.1

Patch Changes

0.67.0

Minor Changes

  • #4540 11ef83b4 Thanks @bryanph! - The Slate Provider's "value" prop is now only used as initial state for editor.children as was intended before. If your code relies on replacing editor.children you should do so by replacing it directly instead of relying on the "value" prop to do this for you.

Patch Changes

  • #4605 87ab2efa Thanks @jaked! - defer native events within Editable to avoid bugs with Editor

0.66.7

Patch Changes

  • #4588 ae65ae5f Thanks @jaked! - revert #4455 / #4512; fix triple-click by unhanging range with void

0.66.6

Patch Changes

0.66.4

Patch Changes

0.66.3

Patch Changes

  • #4547 677da0ca Thanks @clauderic! - Fixed a bug that caused the editor to be unable to resolve a Slate point from a DOM point when selecting an entire document that ended in a new line in Firefox.

0.66.2

Patch Changes

0.66.1

Patch Changes

0.66.0

Minor Changes

Patch Changes

  • #4454 d06706c9 Thanks @imdbsd! - Fix to read fragment from data-slate-fragment when application/x-slate-fragment is missing
  • #4460 ace397f9 Thanks @dylans! - fix double character insertion regression due to unnecessary memo

0.65.3

Patch Changes

  • #4394 01889807 Thanks @jaked! - fix bug where decorate is not called on immediate children of editor
  • #4427 3f69a9f3 Thanks @ben10code! - Fix crash when unmounting an editor rendered within a React portal. The issue was arising at unmount time, because getRootNode returned the dettached portal node and it is not an instance of Document or ShadowRoot. As a fix, getDocumentOrShadowRoot has been refactored to return a root node instead of throwing. In sum, this patch fixes a regression bug introduced by ianstormtaylor/slate#3749
  • #4333 e0776c5c Thanks @dylans! - Allow setFragmentData to work without copy/paste or DnD data structure
  • #4421 237edc6e Thanks @jaked! - fix decorate bug (#4277) without adding extra layers of render tree

0.65.2

Patch Changes

0.65.1

Patch Changes

0.65.0

Minor Changes

  • #4299 2c17e2b7 Thanks @georgberecz! - Allow custom event handlers on Editable component to return boolean flag to specify whether the event can be treated as being handled.

    By default, the Editable component comes with a set of event handlers that handle typical rich-text editing behaviors (for example, it implements its own onCopy, onPaste, onDrop, and onKeyDown handlers).

    In some cases you may want to extend or override Slate's default behavior, which can be done by passing your own event handler(s) to the Editable component.

    Your custom event handler can control whether or not Slate should execute its own event handling for a given event after your handler runs depending on the return value of your event handler as described below.

    import {Editable} from 'slate-react';
    
    function MyEditor() {
      const onClick = event => {
        // Implement custom event logic...
    
        // When no value is returned, Slate will execute its own event handler when
        // neither isDefaultPrevented nor isPropagationStopped was set on the event
      };
    
      const onDrop = event => {
        // Implement custom event logic...
    
        // No matter the state of the event, treat it as being handled by returning
        // true here, Slate will skip its own event handler
        return true;
      };
    
      const onDragStart = event => {
        // Implement custom event logic...
    
        // No matter the status of the event, treat event as *not* being handled by
        // returning false, Slate will exectue its own event handler afterward
        return false;
      };
    
      return (
        <Editable
          onClick={onClick}
          onDrop={onDrop}
          onDragStart={onDragStart}
          {/*...*/}
        />
      )
    }

Patch Changes

  • #4307 a7e3a181 Thanks @clauderic! - Fix deletion of selected inline void nodes in Chrome. Chrome does not fire a beforeinput event when deleting backwards within an inline void node, so we need to add special logic to handle this edge-case for Chrome only.
  • #4295 dfc03960 Thanks @dubzzz! - Fix React warnings related to autoCorrect and autoCapitalize attributes being passed as a boolean instead of a string.
  • #4271 ff267767 Thanks @omerg! - Fixed typo: Renamed toSlatePoint argument extractMatch to exactMatch

0.64.0

Minor Changes

  • #4257 4f0d1120 Thanks @clauderic! - Added support for Android devices using a MutationObserver based reconciliation layer.

    Bugs should be expected; translating mutations into a set of operations that need to be reconciled onto the Slate model is not an absolute science, and requires a lot of guesswork and handling of edge cases. There are still edge cases that aren't being handled.

    This reconciliation layer aims to support Android 10 and 11. Earlier versions of Android work to a certain extent, but have more bugs and edge cases that currently aren't well supported.

0.63.0

Patch Changes

  • #4237 623960a7 Thanks @dylans! - Fixed text insertion logic to prevent crashing in newer Firefox versions.

0.62.1

Patch Changes

  • #4190 ea2eefef Thanks @juliankrispel! - Added a renderPlaceholder prop to the <Editable> component for customizing how placeholders are rendered.
  • #4211 1c32b97d Thanks @clauderic! - Collapse expanded selection before handling moveWordBackward (alt + left) and moveWordForward (alt + right) hotkeys.

0.62.0

Minor Changes

  • c6002024 - Add directional awareness to Editor.deleteFragment. This is an obscure change, but is a required distinction when implementing features that need to "fake delete" content (like Google Docs's suggestions). Previously deleting always collapsed to the end of a range, but now it can collapse forwards as well.
  • #4154 7283c51f Thanks @ianstormtaylor! - Start using 🦋 Changesets to manage releases. Going forward, whenever a pull request is made that fixes or adds functionality to Slate, it will need to be accompanied by a changset Markdown file describing the change. These files will be automatically used in the release process when bump the versions of Slate and compiling the changelog.

Patch Changes

  • c6002024 - Fixed spellcheck disabling logic to always work in older versions of Firefox.
  • c6002024 - Fixed browser-detection behavior to work with Deno.
  • d5589279 - Updated placeholder styles to allow for wrapping long placeholder text.
  • #3652 f3fb40cc Thanks @Andarist! - Fixed selection logic when a controlled editor's nodes change out from under it.
  • c6002024 - Fixed a bug where memoization logic would prevent placeholders from re-rendering properly.
  • c6002024 - Fixed cursor movement in RTL text.
  • c6002024 - Fixed a bug in the conversion of DOM points to Slate points.
  • #3746 f8be509e Thanks @gztomas! - Fixed auto-scrolling behavior when a block is bigger than the viewport.
  • c6002024 - Fixed a bug that occurred when using Babel's loose mode.
  • c6002024 - Fixed deleting void elements when using cut-and-paste.
  • c6002024 - Fixed a bug that crashed the editor when using IME input.
  • #3396 469e6b26 Thanks @cvlmtg! - Fixed allowing the onPaste handler to be overridden in all browsers.
  • c6002024 - Fixed internal decoration logic to be faster and require fewer re-renders.
  • #3894 7fe41f15 Thanks @msc117! - Fixed an error that happened when selecting void nodes in a read-only editor.
  • c6002024 - Fixed move_node operations to not always require a full re-render.
  • d5589279 - Fixed normalization of DOM points to be more accurate when triple-clicking.
  • d5589279 - Fixed a bug that prevented isFocused from updating on certain focus changes.
  • c6002024 - Fixed IME input to not insert repeated characters.
  • c6002024 - Fixed deleting by line to account for the line breaks in the browser.