Closed bestit-ewieser closed 2 years ago
@bestit-ewieser thank you for raising this Issue. I'm currently trying to go through all the old Issues and PRs in a mission to get things back on track.
When I tried to replicate this issue everything seems to have worked. Is it possible that you are using the old V1 API? This is the API Response I got:
{
"type": "paragraph",
"text": "This is a Text with a target Link and a normal Link!",
"spans": [
{
"start": 22,
"end": 33,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https:\/\/prismic.io",
"target": "_blank"
}
},
{
"start": 40,
"end": 51,
"type": "hyperlink",
"data": {
"link_type": "Web",
"url": "https:\/\/prismic.io"
}
}
]
},
Please let me know if that question continues to be relevant. I'd be happy to resolve it or close it if it's not a bug anymore.
@c0nst4ntin Thanks for your reply! This bug is not relevant for us any more since we don't use Prismic in any of our projects currently. So I closed this issue.
https://github.com/prismicio/php-kit/blob/5670c79a639c09b96ad9460592713fad3a7f777d/src/Prismic/Dom/RichText.php#L307
The method looks for attributes
$element->data->target
,$element->data->link_type
and$element->data->url
.Instead the structure of
$element
provided by the API is the following: