Hello,
I tried to link an asset (in my example image) with link embed but its getting rendered as an asset / image instead of a link.
I checked the code and found the following line:
|
if (isEmbed && nodeType !== 'Asset') { |
There is a condition on type link if its not an asset. Therefor it is not possible to reference an asset in link embed.
Is this a bug or how does this work?
As per documentation it should work to reference assets in links: https://hygraph.com/docs/api-reference/content-api/rich-text-field#embed-assets
Hope you can help me out :)
Best regards
Tobi
Hello,
I tried to link an asset (in my example image) with link embed but its getting rendered as an asset / image instead of a link.
I checked the code and found the following line:
rich-text/packages/react-renderer/src/RichText.tsx
Line 147 in 9e1a163
There is a condition on type link if its not an asset. Therefor it is not possible to reference an asset in link embed.
Is this a bug or how does this work?
As per documentation it should work to reference assets in links: https://hygraph.com/docs/api-reference/content-api/rich-text-field#embed-assets
Hope you can help me out :)
Best regards
Tobi