zbeyens
released this
18 Sep 06:41
·
3222 commits
to main
since this release
Major Changes
-
- [Breaking] Rename
Plate
toPlateContent
. - [Breaking] Rename
PlateProvider
toPlate
. - [Breaking] Rendering
PlateContent
is now required inPlate
. This allows you to choose where to render the editor next to other components like toolbar. Example:
// Before <Plate /> // or <PlateProvider> <Plate /> </PlateProvider> // After <Plate> <PlateContent /> </Plate>
- [Breaking] Remove provider props such as
plugins
fromPlateContent
. These props should be passed toPlate
. - [Breaking] Remove
editableProps
prop fromPlateContent
. Move these asPlateContent
props. - [Breaking] Remove
children
prop fromPlateContent
. Render instead these components afterPlateContent
. - [Breaking] Remove
firstChildren
prop fromPlateContent
. Render instead these components beforePlateContent
. - [Breaking] Remove
editableRef
prop fromPlateContent
. Useref
instead. - [Breaking] Remove
withPlateProvider
. - [Breaking] Rename
usePlateEditorRef
touseEditorRef
. - [Breaking] Rename
usePlateEditorState
touseEditorState
. - [Breaking] Rename
usePlateReadOnly
touseEditorReadOnly
. This hook can be used belowPlate
whileuseReadOnly
can only be used in node components. - [Breaking] Rename
usePlateSelection
touseEditorSelection
. - [Breaking] Rename store attributes
keyDecorate
,keyEditor
andkeySelection
toversionDecorate
,versionEditor
andversionSelection
. These are now numbers incremented on each change. - [Breaking] Rename store attribute
isRendered
toisMounted
. - Add
maxLength
prop toPlate
. Specifies the maximum number of characters allowed in the editor. This is a new core plugin (createLengthPlugin
). - Add
useEditorVersion
hook. Version incremented on each editor change. - Add
useSelectionVersion
hook. Version incremented on each selection change. - Fix
editor.reset
should now reset the editor without mutating the ref so it does not remountPlateContent
. Default is usingresetEditor
. If you need to replace the editor ref, useuseReplaceEditor
. - [Type] Remove generic from
TEditableProps
,RenderElementFn
,RenderAfterEditable
- [Breaking] Rename