Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@udecode/plate-core@17.0.0
Major Changes
#1871 by @zbeyens –
usePlateStore
:PlateProvider
orPlate
(provider-less mode). It means it's no longer accessible outside of a Plate React tree. If you have such use-case, you'll need to build your own layer to share the state between your components.PlateProvider
with different scopes (id
prop). Default scope isPLATE_SCOPE
const value = usePlateSelectors(id).value()
const setValue = usePlateActions(id).value()
const [value, setValue] = usePlateStates(id).value()
editableProps
, use the props insteadenabled
, use conditional rendering insteadisReady
, no point anymore as it's now directly readyuseEventPlateId
is still used to get the last focused editor id.{ fn: <here> }
const setOnChange = usePlateActions(id).onChange()
setOnChange({ fn: newOnChange })
Plate
PlateProvider
, it will renderPlateSlate > PlateEditable
PlateProvider
, it will renderPlateProvider > PlateSlate > PlateEditable
id
is no longermain
, it's nowPLATE_SCOPE
PlateProvider
scope
, so you can have multiple providers in the same React tree and use the plate hooks with the correspondingscope
.PlateProvider
initialValue, value, editor, normalizeInitialValue, normalizeEditor
are no longer defined in an effect (SSR support)Plate
propsPlateProvider
, set the provider props on it instead ofPlate
.Plate
would only neededitableProps
andPlateEditableExtendedProps
Plate
editor
is no longer nullablevalue
is no longer nullableid
type is nowPlateId
SCOPE_PLATE
toPLATE_SCOPE
getEventEditorId
togetEventPlateId
getPlateActions().resetEditor
touseResetPlateEditor()
plateIdAtom
usePlateId
forusePlateSelectors().id()
EditablePlugins
forPlateEditable
SlateChildren
PlateEventProvider
forPlateProvider
withPlateEventProvider
forwithPlateProvider
usePlate
usePlatesStoreEffect
useEventEditorId
foruseEventPlateId
platesStore, platesActions, platesSelectors, usePlatesSelectors
getPlateActions
forusePlateActions
getPlateSelectors
forusePlateSelectors
getPlateEditorRef
forusePlateEditorRef
getPlateStore, usePlateStore
EditorId
forPlateId
Minor Changes
#1871 by @zbeyens –
useEventPlateId
returns:id
if definedPLATE_SCOPE
otherwisenanoid
PlateProvider
PlateProviderEffects
PlateSlate
PlateEditable
Patch Changes
editor.selection
is null after unmount/remount #1343@udecode/plate-code-block@17.0.0
Major Changes
prismjs/components/prism-django
prismjs/components/prism-ejs
prismjs/components/prism-php
@udecode/plate-ui@17.0.0
Major Changes
[ELEMENT_CODE_BLOCK]: CodeBlockElement
from Plate UI. You can define it in your app.@udecode/plate-button@17.0.0
@udecode/plate-find-replace@17.0.0
@udecode/plate-autoformat@17.0.0
@udecode/plate-break@17.0.0
@udecode/plate-combobox@17.0.0
@udecode/plate-node-id@17.0.0
@udecode/plate-normalizers@17.0.0
@udecode/plate-reset-node@17.0.0
@udecode/plate-select@17.0.0
@udecode/plate-trailing-block@17.0.0
@udecode/plate-floating@17.0.0
@udecode/plate-headless@17.0.0
@udecode/plate-media@17.0.0
@udecode/plate-alignment@17.0.0
@udecode/plate-basic-elements@17.0.0
@udecode/plate-basic-marks@17.0.0
@udecode/plate-block-quote@17.0.0
@udecode/plate-font@17.0.0
@udecode/plate-heading@17.0.0
@udecode/plate-highlight@17.0.0
@udecode/plate-horizontal-rule@17.0.0
@udecode/plate-indent@17.0.0
@udecode/plate-indent-list@17.0.0
@udecode/plate-kbd@17.0.0
@udecode/plate-line-height@17.0.0
@udecode/plate-link@17.0.0
@udecode/plate-list@17.0.0
@udecode/plate-mention@17.0.0
@udecode/plate-paragraph@17.0.0
@udecode/plate-table@17.0.0
@udecode/plate@17.0.0
@udecode/plate-selection@17.0.0
@udecode/plate-serializer-csv@17.0.0
@udecode/plate-serializer-docx@17.0.0
@udecode/plate-serializer-html@17.0.0
@udecode/plate-juice@17.0.0
@udecode/plate-serializer-md@17.0.0
@udecode/plate-ui-button@17.0.0
@udecode/plate-ui-combobox@17.0.0
@udecode/plate-ui-cursor@17.0.0
@udecode/plate-ui-dnd@17.0.0
@udecode/plate-ui-find-replace@17.0.0
@udecode/plate-ui-alignment@17.0.0
@udecode/plate-ui-block-quote@17.0.0
@udecode/plate-ui-code-block@17.0.0
@udecode/plate-ui-excalidraw@17.0.0
@udecode/plate-ui-font@17.0.0
@udecode/plate-ui-horizontal-rule@17.0.0
@udecode/plate-ui-line-height@17.0.0
@udecode/plate-ui-link@17.0.0
@udecode/plate-ui-list@17.0.0
@udecode/plate-ui-media@17.0.0
@udecode/plate-ui-mention@17.0.0
@udecode/plate-ui-table@17.0.0
@udecode/plate-ui-placeholder@17.0.0
@udecode/plate-ui-popper@17.0.0
@udecode/plate-styled-components@17.0.0
@udecode/plate-ui-toolbar@17.0.0