Open
Description
Link to reproduction
No response
Describe the Bug
The following line in the rich text traverser detects relations based on the relationTo
and value
fields inside any given iterated object in a rich text tree:
However, when using the blocks feature in the lexical rte, relationships are not defined by those fields, and instead simply hold an id
string reference field.
Because of this, the rich text traverser is never able to resolve relation fields inside blocks.
To Reproduce
- Enable lexical editor field on some collection.
- Use the Blocks feature
- Create a block with a
type: 'relation'
field, with arelationTo
some other collection. - Populate the field in the admin UI
- Implement the live preview feature, set
depth
> 0 - Check the data returned from the
callback
function - The relation field in the respective block will always just havr a
<fieldname>: <id>
entry, regardless of thedepth
parameter.
Payload Version
2.11.2
Adapters and Plugins
@payloadcms/[email protected]