Comparing version 0.13.0 to 0.14.0
@@ -7,2 +7,19 @@ # Changelog | ||
## [[v0.14.0]](https://github.com/springload/draftail/releases/tag/v0.14.0) | ||
### Added | ||
* Make line break and horizontal line controls configurable, by passing an object with `icon`, `label`, `description` props. | ||
* Add ability to set `textAlignment`, `textDirectionality`, `autoCapitalize`, `autoComplete`, `autoCorrect` props of Draft.js. | ||
### Changed | ||
* Rename `DraftUtils.addLineBreakRemovingSelection` to `DraftUtils.addLineBreak`. | ||
* Replace `showUndoRedoControls` with separate props `showUndoControl` and `showRedoControl` for which control UI can be overriden. | ||
* Make all keyboard shortcut labels language agnostic. | ||
### Fixed | ||
* Fix `DraftUtils.addLineBreak` adding line breaks in the wrong place when selection is collapsed. | ||
## [[v0.13.0]](https://github.com/springload/draftail/releases/tag/v0.13.0) | ||
@@ -9,0 +26,0 @@ |
{ | ||
"name": "draftail", | ||
"version": "0.13.0", | ||
"version": "0.14.0", | ||
"description": "ππΈ A configurable rich text editor based on Draft.js, built for Wagtail", | ||
@@ -5,0 +5,0 @@ "author": "Springload", |
@@ -108,8 +108,26 @@ # [Draftail](https://springload.github.io/draftail/) [![npm](https://img.shields.io/npm/v/draftail.svg?style=flat-square)](https://www.npmjs.com/package/draftail) [![Build Status](https://travis-ci.org/springload/draftail.svg?branch=master)](https://travis-ci.org/springload/draftail) [![Coverage Status](https://coveralls.io/repos/github/springload/draftail/badge.svg)](https://coveralls.io/github/springload/draftail) [<img src="https://cdn.rawgit.com/springload/awesome-wagtail/ac912cc661a7099813f90545adffa6bb3e75216c/logo.svg" width="104" align="right" alt="Wagtail">](https://wagtail.io/) | ||
enableLineBreak: false, | ||
// Show undo/redo controls in the toolbar. | ||
showUndoRedoControls: false, | ||
// Show undo control in the toolbar. | ||
showUndoControl: false, | ||
// Show redo control in the toolbar. | ||
showRedoControl: false, | ||
// Disable copy/paste of rich text in the editor. | ||
stripPastedStyles: true, | ||
// Set whether spellcheck is turned on for your editor. | ||
// See https://draftjs.org/docs/api-reference-editor.html#spellcheck. | ||
spellCheck: false, | ||
// Optionally set the overriding text alignment for this editor. | ||
// See https://draftjs.org/docs/api-reference-editor.html#textalignment. | ||
textAlignment: null, | ||
// Optionally set the overriding text directionality for this editor. | ||
// See https://draftjs.org/docs/api-reference-editor.html#textdirectionality. | ||
textDirectionality: null, | ||
// Set if auto capitalization is turned on and how it behaves. | ||
// See https://draftjs.org/docs/api-reference-editor.html#autocapitalize-string. | ||
autoCapitalize: null, | ||
// Set if auto complete is turned on and how it behaves. | ||
// See https://draftjs.org/docs/api-reference-editor.html#autocomplete-string. | ||
autoComplete: null, | ||
// Set if auto correct is turned on and how it behaves. | ||
// See https://draftjs.org/docs/api-reference-editor.html#autocorrect-string. | ||
autoCorrect: null, | ||
// List of the available block types. | ||
@@ -525,2 +543,11 @@ blockTypes: [], | ||
### i18n - Internationalization | ||
The editor comes with default labels in english, but all are overridable. | ||
* For blocks, styles, and entities, use the `label` and-or `description` prop to set text in the right language. | ||
* For boolean controls (`enableLineBreak`, etc), set instead an object with `icon`, `label`, `description` props (all optional). | ||
Depending on the target language, you may also need to use the `textDirectionality` prop (`LTR` or `RTL`). See the full [Draft.js documentation](https://draftjs.org/docs/api-reference-editor.html#textdirectionality) for more details. | ||
### Managing focus | ||
@@ -527,0 +554,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
219050
3553
590