Skip to content
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.

Releases: facebookarchive/draft-js

v0.10.4

24 Oct 17:45
Compare
Choose a tag to compare

Added

  • Expose onRightArrow and onLeftArrow props to allow handling keyboard events when right or left arrow is pressed. (@eessex in #1384)
  • Expose Draft.css as default CSS export in package.json for use by CSS preprocessors. (@darobin in #566)

Changed

  • Change 'lookUpwardForInlineStyle' from O(n^2) to O(n), improving performance. :) (@Lemmih in #1429)

Fixed

  • Fix bug where editors inside draggable parent were broken for Safari. (@mattkrick in #1326)
  • Stop pulling in Enzyme as production dependency. D'oh. (@flarnie in #1415)
  • Fix TypeError: Cannot read property 'nodeType' of undefined error where anchorNode was undefined. (@tleunen in #1407)
  • Fix error thrown when callback tries to focus on editor after it has been unmounted. (@mattkrick in #1409)
  • Fix bug where selecting a single character then typing it doesn't replace it. (@karanjthakkar in #719)
  • Clear the block type when backspacing at the start of the first block with rich text utils. (@jvaill in #748)

v0.10.3

28 Sep 22:11
Compare
Choose a tag to compare

Added

Fixed

  • Fixed bug where using a custom block type without overriding the default block map threw an error. (@southerncross in #1302)
  • Update dependency on fbjs to get fix for bug where focus() caused unexpected scroll (@flarnie in #1401)

0.10.2

21 Sep 15:15
Compare
Choose a tag to compare

Added

Changed

  • Change aria-owns to aria-controls in draft.js. (@jessebeach in 7f0cab28)
    • Deprecates support of ariaOwns and ariaOwneeID props.
  • Deprecate use of ariaHasPopup prop in draft.js. ariaExpanded should be used instead if an input is showing a dropdown with options.(@jessebeach in 744e9b4e)
  • Pasting an img no longer inserts the src by default; now inserts image emoji if no decorator is used. (@aadsm in 0b22d713 and @flarnie in 1378)

Fixed

  • Fix issue where selection state was not cleared on blur and refocus of the
    editor. (@sophiebits in
    19b9b1c5)
  • Fix issue where pasting code into code block defaulted to plain text, and
    styles were dropped from pasted blocks in general.
    (@bumbu in
    e8d10112)
  • Fix issue where Flow was not running with some 'import' statements (@flarnie & @yuku-t in #1263)
  • Fix bug where Draft threw when two keys were pressed at same time in React 16 async mode (@sophiebits in 1c6a49b8)
  • Fix recent Chrome bug where tab causes error (@sophiebits in 5863399a)
  • Fix "Refs must have owner" error when multiple copies of React are used (@mks11 in #925)
  • Fix issue where AT could treat 'return' as submit in Draft (@jessebeach in #1295)
  • Don't allow aria-expanded to be true unless the aria role is combobox (@jessebeach in 3494d45d)
  • Fix pesky "This Selection object doesn't have any Ranges" bug (@sophiebits in 96688e10 and 036e3a84)
  • Fix bug where pasting img with large data URL source could crash editor (@aadsm in 0b22d713)

0.10.1

09 May 08:50
Compare
Choose a tag to compare

Added

  • Support UMD in dist output format (#1090)
  • Expose textDirectionality prop
  • Expose props disabling auto-correct, auto-complete, auto-capitalize
  • Add editorKey prop for SSR
  • Pass block to customStyleFn callback
  • Added moveAtomicBlock to AtomicBlockUtils

Fixed

  • Fix some cases of "Failed to execute 'setStart' on 'Range" bug (#1162)
  • Fix Chrome text deletion bug (#1155)
  • Pass fresh editorState to edit handlers (#1112 and #1113)
  • Fix for text insertion bugs in Android 5.1
  • Correctly delete immutable and segmented entity content when at the edge of a
    selection
    • Fix bug where all text except first letter was dropped in IE11
    • Fix bug where starting new line incorrectly toggled inline style
    • Fix 'getRangeClientRects' to work around webkit selection bounding rect
      bug

0.10.0

28 Jan 19:34
Compare
Choose a tag to compare

Added

  • Add improved API for entity manipulation to contentState
  • Add deprecation warnings to old Entity module API
  • Add image support to convertFromHTML
  • Add option of 'aliasedElements' in block render map

Changed

  • This version supports both the old and new Entity API; we
    are deprecating the Entity module in favor of
    using contentState.

Fixed

  • Fix bug where block data was not removed when deleting atomic block
  • Fix bug preventing pasting from clipboard
  • Fix dead key deletion and deletion in 2-Set Korean
  • Fix ContentState.createFromBlockArray to allow taking an empty array
  • Improve typing in Korean on Windows

0.9.1

16 Sep 23:40
Compare
Choose a tag to compare

Fixed

  • Update Flow version
  • Fix flow error in DraftEditorDragHandler

v0.9.0

13 Sep 23:07
Compare
Choose a tag to compare

Changed

  • Return 'handled' or 'not-handled' from cancellable handlers callback
    • Boolean return value is deprecated
  • Expand and update documentation

Fixed

  • Fix selection of atomic block when it is the last block
  • Preserve the depth of custom block types when converting to raw
  • Stop mutating component children when creating blocks with wrapper elements

v0.8.1

12 Aug 16:42
Compare
Choose a tag to compare

Fixed

  • Include object-assign in npm dependencies
  • Include babel-core in npm dependencies of tex example

v0.8.0

09 Aug 18:22
Compare
Choose a tag to compare

Added

  • customStyleFn for more control over inline style ranges
  • Uses internalClipboard for Safari
  • Metadata for ContentBlock objects
  • convertFromHTMLToContentBlocks:
    • Support for mailto protocol for links
    • Support "unset" inline styles
  • Run ESLint on examples

Changed

  • Removed redundant ESLint module in TeX example
  • Update Travis CI config for readability, Node v4 requirements, and pruning/updating npm dependencies
  • Use immutable ~3.7.4 to avoid Flow errors in updated versions
  • Modify getSelectionOffsetKeyForNode to search for nested offset-annotated nodes
  • Upgrade eslint to 3.0.1, use fbjs config
  • Update to Flow 0.28
  • Jest
    • Update to 12.1.1
    • Replaced jest.fn().mockReturnValue(x) with jest.fn(() => x)
  • Remove extra spaces from the text decoration style
  • No longer using nullthrows for blockRenderMap
  • convertFromHTMLToContentBlocks:
    • Improved variable names in joinChunks
    • Additional whitelisted entities such as className, rel, target, title

Fixed

  • Fix bug where placeholder text was not being erased in Chrome
  • Fix bug where double click link in Firefox broke selection
  • Kill iOS tooltips
  • removed unnecessary undefined checks on DraftEditorLeaf
  • convertFromHTMLToContentBlocks:
    • Preserve pasted block type on paste
    • Strip XML carriage returns and zero-width spaces
    • getBlockMapSupportedTags() will always return a valid array of tags
  • Documentation fixes

v0.7.0

04 May 00:22
Compare
Choose a tag to compare

Added

  • blockRenderMap: A map that allows configuration for the DOM elements and
    wrapper components to render, keyed by block type
    • Includes configurability of element-to-block-type paste processing

Changed

  • Update to Jest 11.0.2

Fixed

  • Change deletion behavior around atomic blocks to avoid DOM selection errors
  • Properly apply entities across multiple blocks in
  • Improve placeholder behavior for a11y
  • Properly remove and modify entity ranges during spellcheck changes
  • Match Chrome <textarea> behavior during cmd+backspace
    command at visual line-start