A function that takes any value and produces a diff between that value and the value the node is being compared to.
This can be used to compute a diff optimistically.
This is marked as unstable because the API may need to evolve as we iterate on the advanced version control functionality. It will be stabilised when that project has matured.
Optional BetaarrayWhether the current value is different to the value the node is being compared to.
OptionalcompareThe value the node is currently being compared to. This is taken from the upstream version, if the document has an upstream version. Otherwise, it's taken from the document's current value.
You can use the hasUpstreamVersion prop to determine whether the document has an upstream
version.
Whether the input should display inline changes. Inline changes express how a field's value differs from its upstream version. Unlike custom diff components, inline changes is a mode that allows the input component itself to display the change in situ.
OptionaleditorA React Ref that can reference the underlying editor instance
BetaelementOptionalfocusedWhether the node is focused.
The focus path of the form node.
Whether the document has an upstream version.
OptionalhideOption to hide the default toolbar
OptionalhotkeysAssign hotkeys that can be attached to custom editing functions
The unique identifier of the node.
OptionalinitialWhether the input is activated and should receive events on mount.
By default, this value is set to true
OptionalinitialWhether the input is initially open in fullscreen mode
The level of the node in the form hierarchy.
OptionalmarkersArray of PortableTextMarker with meta data connected to the content.
BetamembersBetaonOptionalonCustom copy function
OptionalonReturns changes from the underlying editor
Optional BetaonOptional callback for when the editor goes into or out of full screen mode
BetaonBetaonBetaonBetaonfor array inputs using expand/collapse semantics for items
BetaonBetaonBetaonfor array inputs using modal open/close semantics for items
BetaonBetaonOptionalonCustom paste function
BetaonOptional BetaonOptional BetaonThe path of the node in the form hierarchy.
BetapresenceOptionalrangeArray of RangeDecoration that can be used to decorate the content.
OptionalreadWhether the node is read-only.
Optional BetarenderOptional BetarenderOptionalrenderFunction to render custom block actions
OptionalrenderFunction to render custom markers
BetarenderOptional BetarenderBetarenderBetarenderBetarenderBetaresolveBetaresolveThe schema type of the node.
The validation markers of the node.
The value of the node.
Component props for the PortableTextInput React component.
Extends ArrayOfObjectsInputProps.