Hi team,
We are trying to replace certain keywords in a Prismic JSON and re-upload it back to Prismic via the migration API. I noticed it would cause problems in paragraphs with links. For example in a paragraph:
`{
"type":"paragraph",
"content":{
"text":"Use this TOOL free plan text converter If you need to convert your copied text to plain text, just paste your text here",
"spans":[
{
"start":9,
"end":12,
"type":"hyperlink",
"data":{
"url":"https://www.something.com"
}
}
]
}
}`
If I want to replace the keyword instance of `TOOL``` to NEWTOOL, the hyperlink start and end position will also change, which means we need to re-calculate the position of all the links in a paragraph. Is there a better to achieve the similar result?
Thanks,
Patrick