You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I saw that the option to customise the key for link destinations was added to the deserialization function, but it'd be good to have it in the serializer as well.
I expect we'd need to add linkDestinationKey to the serializer options, then use it here:
case nodeTypes.link:
return `[${children}](${(chunk as BlockType)[linkDestinationKey] || ''})`;
Unfortunately, BlockType expects 'link' only, so I'm not sure whether it would make sense to make that property type more permissive or maybe I'm missing an alternative way to handle this. Happy to submit a PR with some guidance.
I saw that the option to customise the key for link destinations was added to the deserialization function, but it'd be good to have it in the serializer as well.
I expect we'd need to add
linkDestinationKey
to the serializer options, then use it here:Unfortunately, BlockType expects 'link' only, so I'm not sure whether it would make sense to make that property type more permissive or maybe I'm missing an alternative way to handle this. Happy to submit a PR with some guidance.
Example Slate object:
Would convert to
The text was updated successfully, but these errors were encountered: