File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Changelog
2+ ## [ 1.1.0] ( https://github.com/contentstack/contentstack-utils-php/tree/v1.1.0 ) (2021-07-16)
3+ - JSON RTE to html content functionality for GQL API added
4+ ## [ 1.0.1] ( https://github.com/contentstack/contentstack-utils-php/tree/v1.0.1 ) (2021-07-16)
5+ - JSON RTE to html content functionality added
26
37## [ 1.0.0] ( https://github.com/contentstack/contentstack-utils-php/tree/v1.0.0 ) (2021-04-05)
48 - Initial release for Contentstack Utils SDK
Original file line number Diff line number Diff line change @@ -158,3 +158,15 @@ for($i = 0; $i < count($result[0]); $i++) {
158158 $render_rich_text = Contentstack::jsonToHtml($entry['rich_text_content'], new Option($entry));
159159}
160160```
161+ #### GQL
162+
163+ To Convert JSON RTE content to HTML from GQL API. Use ` GQL::jsonToHtml ` function as shown below:
164+
165+ ``` php
166+ use Contentstack\Utils\GQL;
167+ use Contentstack\Utils\Model\Option;
168+ // GQL fetch API
169+ ...
170+ $render_html_text = GQL::jsonToHtml($entry->rich_text_content,, new Option());
171+ ...
172+ ```
You can’t perform that action at this time.
0 commit comments