Notable changes to Draft.js will be documented in this file.
Changes to src are live in production on facebook.com at the time of release.
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
- Update to Jest 11.0.2
- Change deletion behavior around
atomicblocks 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
ContentState.getFirstBlock()convenience method
- return key handling now goes through command flow to enable easier
custom
'split-block'handling. convertFromRawnow returns aContentStateobject instead of anArray<ContentBlock>
- option+spacebar no longer incorrectly scrolls browser in Chrome OSX
- Cursor behavior when adding soft newlines
AtomicBlockUtils, a utility module to simplify addingatomicblocks to anEditorState
- The
mediablock type is nowatomic, to better represent that this type is not just intended for photos and videos
- Avoid clearing inline style override when setting block type or depth
editablefield for custom block component configuration- Default key binding support for Ctrl+M (
split-block)
- Always wrap custom block components, based on block type
- Includes
data-editor,data-offset-key,data-blockin block props
- Includes
- Replace
onPasteRawTextprop withhandlePastedText
- Properly extract custom inline styles for
convertToRaw - Fix internal paste behavior to better handle copied custom blocks
- Export
getVisibleSelectionRect - Export
convertFromHTML - Export
DraftEditorBlock
- Build before publish to get the warning suppression in place correctly
- React 15 RC as peer/dev dependency, provide
suppressContentEditableWarning
- Move
white-space: pre-wrapinto inline style to resolve insertion issues handleDropprop method forEditorto allow manual drop managementdecoratedTextprop for decorator componentsgetVisibleSelectionRect, to provide Rect for DOM selection- Export
KeyBindingUtilandgetDefaultKeyBinding
- Triple-clicks followed by block type changes now only affect first block
DraftEditorLeafnow re-renders correctly when its styles change- Backspace behavior within empty code blocks
- Initial public release