mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-16 20:24:01 +02:00
fix to always normalize ancestors of a node (#1310)
* fix to always normalize ancestors of a node * fix plugins example * update changelog
This commit is contained in:
@@ -15,6 +15,8 @@ This document maintains a list of changes to the `slate-react` package with each
|
||||
|
||||
- **The `plugin.onBeforeChange` function was removed.** Previously there was both an `onBeforeChange` handler and an `onChange` handler. Now there is just an `onChange` handler, and the core plugin adds it's own logic before others.
|
||||
|
||||
- **The `plugin.render` function was renamed to `plugin.renderEditor`.** It performs the same function, but has been renamed to disambiguate between all of the other new rendering functions available to plugins.
|
||||
|
||||
###### NEW
|
||||
|
||||
- **`State` objects now have an embedded `state.schema` property.** This new schema property is used to automatically normalize the state as it changes, according to the editor's current schema. This makes normalization much easier.
|
||||
|
@@ -38,7 +38,7 @@ class Content extends React.Component {
|
||||
static propTypes = {
|
||||
autoCorrect: Types.bool.isRequired,
|
||||
autoFocus: Types.bool.isRequired,
|
||||
children: Types.array.isRequired,
|
||||
children: Types.any.isRequired,
|
||||
className: Types.string,
|
||||
editor: Types.object.isRequired,
|
||||
readOnly: Types.bool.isRequired,
|
||||
|
Reference in New Issue
Block a user