Changelog
This release contains breaking changes compared to v1.4.1. It’s identical to the v2.0.0-rc.6 pre-release.
Documentation: Getting started
FloatingToolbar
component so the editor can be rendered with a minimal height.BlockToolbar
component, intended for keyboard and first-time users.MetaToolbar
component intended to display editor metadata at the bottom of the editor.InlineToolbar
component, which is user-configurable to display either a static or floating toolbar.CommandPalette
component, usable with the commandPalette
rendering prop and the commands
data prop.onPaste
handler for entities to be able to create themselves on paste.Draftail-block--empty
class for styling.Draftail-ToolbarGroup--entities
.block
(static top toolbar), inline
(floating toolbar), meta
(bottom / meta toolbar). They can also have a type
to help with troubleshooting.draftail/lib/index.scss
to draftail/src/index.scss
/
slash character for divisions and separators.For projects using TypeScript, the addition of type definitions is likely to cause new linting issues being reported in case Draftail’s new types are incompatible with the implementation.
draftail/lib/index.scss
to draftail/src/index.scss
The editor now supports modern browsers only, in particular IE11 support has been removed. The new browser support follows evergreen browsers only. The oldest-supported browser is currently Safari 14.1.
| Browser | Device/OS | Version(s) | | ------------- | ---------- | ---------- | | Mobile Safari | iOS Phone | Last 2 | | Mobile Safari | iOS Tablet | Last 2 | | Chrome | Android | Last 2 | | Chrome | Desktop | Last 2 | | MS Edge | Windows | Last 2 | | Firefox | Desktop | Latest | | Firefox ESR | Desktop | Latest | | Safari | macOS | Last 3 |
To introduce RTL support, a lot of the editor’s styles have been rewritten to use CSS logical properties and values, as well as Flexbox and Grid layout. This could lead to issues with bespoke UI customisations.
The controls
prop now takes objects rather than React components. Controls which aren’t updated to the new API will render in the static "top" toolbar only.
Entities now accept a allowlist
attribute rather than whitelist
.