craftcms / element-api

Create a JSON API/Feed for your elements in Craft.
MIT License
498 stars 56 forks source link

Internal links to the entries in redactor field does not render in JSON. #126

Closed CodeCurosity closed 2 years ago

CodeCurosity commented 4 years ago

We have HTML content using redactor field, its gets all the html and external links but internal links to the entries are not rendered and shows this {entry:43135:url}

brandonkelly commented 2 years ago

You should be including the Redactor field via:

'body' => (string)$entry->myRedactorField,

or

'body' => $entry->myRedactorField->getParsedContent(),

If you do either of those, the reference tags will be parsed correctly.