diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a97dd9..90dc75a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - name: Setup PHP with Xdebug 2.x uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.0' coverage: xdebug2 - name: Validate composer.json and composer.lock diff --git a/CHANGELOG.md b/CHANGELOG.md index b6ae705..ca16168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## [1.1.0](https://github.com/contentstack/contentstack-utils-php/tree/v1.1.0) (2021-07-16) + - JSON RTE to html content functionality for GQL API added +## [1.0.1](https://github.com/contentstack/contentstack-utils-php/tree/v1.0.1) (2021-07-16) + - JSON RTE to html content functionality added ## [1.0.0](https://github.com/contentstack/contentstack-utils-php/tree/v1.0.0) (2021-04-05) - Initial release for Contentstack Utils SDK diff --git a/README.md b/README.md index 44ed5da..dc552b5 100644 --- a/README.md +++ b/README.md @@ -158,3 +158,15 @@ for($i = 0; $i < count($result[0]); $i++) { $render_rich_text = Contentstack::jsonToHtml($entry['rich_text_content'], new Option($entry)); } ``` +#### GQL + +To Convert JSON RTE content to HTML from GQL API. Use `GQL::jsonToHtml` function as shown below: + +```php +use Contentstack\Utils\GQL; +use Contentstack\Utils\Model\Option; +// GQL fetch API +... + $render_html_text = GQL::jsonToHtml($entry->rich_text_content,, new Option()); +... +``` \ No newline at end of file diff --git a/src/BaseParser.php b/src/BaseParser.php new file mode 100644 index 0000000..3ecb92e --- /dev/null +++ b/src/BaseParser.php @@ -0,0 +1,99 @@ +type)) { + switch ($node->type) { + case NodeType::get(NodeType::REFERENCE)->getValue(): + $resultHtml = BaseParser::referenceToHtml($node, $renderEmbed); + break; + default: + $innerHtml = ""; + if (isset($node->children)) + { + $innerHtml = BaseParser::nodeChildrenToHtml($node->children, $option, $renderEmbed); + } + $resultHtml = $option->renderNode( + $node->type, + $node, + $innerHtml + ); + break; + } + } else { + $resultHtml = BaseParser::textToHtml($node, $option); + } + return $resultHtml; + } + + protected static function textToHtml(object $node, Option $option) + { + $text = $node->text; + if (isset($node->superscript) && $node->superscript) { + $text = $option->renderMark(MarkType::get(MarkType::SUPERSCRIPT), $text); + } + if (isset($node->subscript) && $node->subscript) { + $text = $option->renderMark(MarkType::get(MarkType::SUBSCRIPT), $text); + } + if (isset($node->inlineCode) && $node->inlineCode) { + $text = $option->renderMark(MarkType::get(MarkType::INLINE_CODE), $text); + } + if (isset($node->strikethrough) && $node->strikethrough) { + $text = $option->renderMark(MarkType::get(MarkType::STRIKE_THROUGH), $text); + } + if (isset($node->underline) && $node->underline) { + $text = $option->renderMark(MarkType::get(MarkType::UNDERLINE), $text); + } + if (isset($node->italic) && $node->italic) { + $text = $option->renderMark(MarkType::get(MarkType::ITALIC), $text); + } + if (isset($node->bold) && $node->bold) { + $text = $option->renderMark(MarkType::get(MarkType::BOLD), $text); + } + return $text; + } + + protected static function referenceToHtml(object $node, $renderEmbed) + { + $metadata = new Metadata($node); + return $renderEmbed($metadata); + } + + protected static function findEmbeddedObject(\DOMDocument $doc): array { + $xpath = new \DOMXPath($doc); + $elements = $xpath->query('//*[contains(@class, "embedded-asset") or contains(@class, "embedded-entry")]'); + $metadataArray = array(); + foreach ($elements as $node) { + $metadataArray[] = new Metadata($node); + } + return $metadataArray; + } + + static function innerHTML(\DOMElement $element) + { + $doc = $element->ownerDocument; + $html = ''; + foreach ($element->childNodes as $node) { + $html .= $doc->saveHTML($node); + } + return $html; + } +} \ No newline at end of file diff --git a/src/GQL.php b/src/GQL.php new file mode 100644 index 0000000..ef54675 --- /dev/null +++ b/src/GQL.php @@ -0,0 +1,57 @@ +embedded_itemsConnection != null ? $content->embedded_itemsConnection->edges : []; + + if (isset($content->json) && isset($content->json->children)) { + return GQL::nodeChildrenToHtml($content->json->children, $option, function (Metadata $metadata) use ($option, $embeddedItems): string { + $resultHtml = ''; + $object = GQL::findObject($metadata, $embeddedItems); + if (count($object) > 0) { + $resultHtml = $option->renderOptions($object, $metadata); + } + return $resultHtml; + }); + } else if (is_array($content->json)) { + foreach ($content->json as $node) { + $result[] = GQL::nodeChildrenToHtml($node->children, $option, function (Metadata $metadata) use ($option, $embeddedItems): string { + $resultHtml = ''; + $object = GQL::findObject($metadata, $embeddedItems); + if (count($object) > 0) { + $resultHtml = $option->renderOptions($object, $metadata); + } + return $resultHtml; + }); + } + } + return $result; + } + protected static function findObject(Metadata $metadata, array $embeddedItems): array + { + + foreach ($embeddedItems as $entry) + { + if ($entry->node) + { + $item = $entry->node; + if ($item->system && $item->system->uid && $item->system->uid == $metadata->getItemUid()) + { + return json_decode(json_encode($item), true); + } + } + } + return []; + } +} \ No newline at end of file diff --git a/src/Model/Option.php b/src/Model/Option.php index a9554fc..57eb6ef 100644 --- a/src/Model/Option.php +++ b/src/Model/Option.php @@ -136,12 +136,12 @@ function renderNode(string $nodeType, object $node, string $innerHtml): string return $resultString; } - function renderOptions(array $embeddedObject, Metadata $metadata): string + function renderOptions(array $embeddedObject, Metadata $metadata): string { $resultString = ""; switch ($metadata->getStyleType()) { case StyleType::get(StyleType::BLOCK): - $resultString = "

" . ($embeddedObject["title"] ?? $embeddedObject["uid"]) . "

Content type: ". $embeddedObject["_content_type_uid"] ."

"; + $resultString = "

" . ($embeddedObject["title"] ?? $embeddedObject["uid"]) . "

Content type: ". ($embeddedObject["_content_type_uid"] ?? $embeddedObject["system"]["content_type_uid"]) ."

"; break; case StyleType::get(StyleType::INLINE): $resultString = "".($embeddedObject["title"] ?? $embeddedObject["uid"]).""; diff --git a/src/Utils.php b/src/Utils.php index 5c34676..d18479d 100644 --- a/src/Utils.php +++ b/src/Utils.php @@ -9,7 +9,7 @@ use Contentstack\Utils\Enum\NodeType; use Contentstack\Utils\Enum\MarkType; -class Utils +class Utils extends BaseParser { /** * @@ -70,94 +70,21 @@ public static function jsonArrayToHtml(array $contents, Option $option): array { public static function jsonToHtml(object $content, Option $option): string { $resultHtml = ''; if (isset($content->children)) { - $resultHtml = Utils::nodeChildrenToHtml($content->children, $option); - } - return $resultHtml; - } - - private static function nodeChildrenToHtml(array $nodes, Option $option): string { - return \implode('', \array_map(function (object $node) use ($option): string { - return Utils::nodeToHtml($node, $option); - }, $nodes)); - } - - private static function nodeToHtml(object $node, Option $option): string { - $resultHtml = ''; - if (isset($node->type)) { - switch ($node->type) { - case NodeType::get(NodeType::REFERENCE)->getValue(): - $resultHtml = Utils::referenceToHtml($node, $option); - break; - default: - $innerHtml = ""; - if (isset($node->children)) - { - $innerHtml = Utils::nodeChildrenToHtml($node->children, $option); + $resultHtml = Utils::nodeChildrenToHtml($content->children, $option, function (Metadata $metadata) use ($option): string { + $resultHtml = ''; + if ($option->entry) { + $object = Utils::findObject($metadata, $option->entry); + if (count($object) > 0) { + $resultHtml = $option->renderOptions($object, $metadata); } - $resultHtml = $option->renderNode( - $node->type, - $node, - $innerHtml - ); - break; - } - } else { - $resultHtml = Utils::textToHtml($node, $option); - } - return $resultHtml; - } - - private static function textToHtml(object $node, Option $option) - { - $text = $node->text; - if (isset($node->superscript) && $node->superscript) { - $text = $option->renderMark(MarkType::get(MarkType::SUPERSCRIPT), $text); - } - if (isset($node->subscript) && $node->subscript) { - $text = $option->renderMark(MarkType::get(MarkType::SUBSCRIPT), $text); - } - if (isset($node->inlineCode) && $node->inlineCode) { - $text = $option->renderMark(MarkType::get(MarkType::INLINE_CODE), $text); - } - if (isset($node->strikethrough) && $node->strikethrough) { - $text = $option->renderMark(MarkType::get(MarkType::STRIKE_THROUGH), $text); - } - if (isset($node->underline) && $node->underline) { - $text = $option->renderMark(MarkType::get(MarkType::UNDERLINE), $text); - } - if (isset($node->italic) && $node->italic) { - $text = $option->renderMark(MarkType::get(MarkType::ITALIC), $text); - } - if (isset($node->bold) && $node->bold) { - $text = $option->renderMark(MarkType::get(MarkType::BOLD), $text); - } - return $text; - } - - private static function referenceToHtml(object $node, Option $option) - { - $resultHtml = ''; - if ($option->entry) { - $metadata = new Metadata($node); - $object = Utils::findObject($metadata, $option->entry); - if (count($object) > 0) { - $resultHtml = $option->renderOptions($object, $metadata); - } + } + return $resultHtml; + }); } return $resultHtml; } - private static function findEmbeddedObject(\DOMDocument $doc): array { - $xpath = new \DOMXPath($doc); - $elements = $xpath->query('//*[contains(@class, "embedded-asset") or contains(@class, "embedded-entry")]'); - $metadataArray = array(); - foreach ($elements as $node) { - $metadataArray[] = new Metadata($node); - } - return $metadataArray; - } - - private static function findObject(Metadata $metadata, array $entry): array + protected static function findObject(Metadata $metadata, array $entry): array { if (array_key_exists('_embedded_items', $entry)) { @@ -174,14 +101,4 @@ private static function findObject(Metadata $metadata, array $entry): array } return []; } - - static function innerHTML(\DOMElement $element) - { - $doc = $element->ownerDocument; - $html = ''; - foreach ($element->childNodes as $node) { - $html .= $doc->saveHTML($node); - } - return $html; - } } diff --git a/tests/GQLTest.php b/tests/GQLTest.php new file mode 100644 index 0000000..ae95b0b --- /dev/null +++ b/tests/GQLTest.php @@ -0,0 +1,332 @@ +single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(Blank, trim(preg_replace('/\s\s+/', '', $result))); + $this->assertEquals([Blank], $arrayResult); + } + + public function testShouldReturnH1TagOnNonChild(): void + { + $jsonString = GQLTest::gqlEntry(H1NonChildJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals('

', $result); + $this->assertEquals(['

'], $arrayResult); + } + + public function testShouldReturnStringForPlainTextDocument(): void + { + $jsonString = GQLTest::gqlEntry(PlainTextJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(PlainTextHtml, $result); + $this->assertEquals([PlainTextHtml], $arrayResult); + } + + public function testShouldReturnParagraphOnParagraph(): void + { + $jsonString = GQLTest::gqlEntry(ParagraphJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(ParagraphHtml, $result); + $this->assertEquals([ParagraphHtml], $arrayResult); + } + + public function testShouldReturnLinkTagOnLink(): void + { + $jsonString = GQLTest::gqlEntry(LinkInPJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(LinkInPHtml, $result); + $this->assertEquals([LinkInPHtml], $arrayResult); + } + + public function testShouldReturnImageTagOnImage(): void + { + $jsonString = GQLTest::gqlEntry(ImgJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(ImgHtml, $result); + $this->assertEquals([ImgHtml], $arrayResult); + } + + public function testShouldReturnEmbedTagOnEmbed(): void + { + $jsonString = GQLTest::gqlEntry(EmbedJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(EmbedHtml, $result); + $this->assertEquals([EmbedHtml], $arrayResult); + } + + public function testShouldReturnH1TagOnH1(): void + { + $jsonString = GQLTest::gqlEntry(H1Json); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(H1Html, $result); + $this->assertEquals([H1Html], $arrayResult); + } + + public function testShouldReturnH2TagOnH2(): void + { + $jsonString = GQLTest::gqlEntry(H2Json); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(H2Html, $result); + $this->assertEquals([H2Html], $arrayResult); + } + + public function testShouldReturnH1TagOnH3(): void + { + $jsonString = GQLTest::gqlEntry(H3Json); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(H3Html, $result); + $this->assertEquals([H3Html], $arrayResult); + } + + public function testShouldReturnH1TagOnH4(): void + { + $jsonString = GQLTest::gqlEntry(H4Json); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(H4Html, $result); + $this->assertEquals([H4Html], $arrayResult); + } + + public function testShouldReturnH1TagOnH5(): void + { + $jsonString = GQLTest::gqlEntry(H5Json); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(H5Html, $result); + $this->assertEquals([H5Html], $arrayResult); + } + + public function testShouldReturnH1TagOnH6(): void + { + $jsonString = GQLTest::gqlEntry(H6Json); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(H6Html, $result); + $this->assertEquals([H6Html], $arrayResult); + } + + public function testShouldReturnOrderListTagOnOrderList(): void + { + $jsonString = GQLTest::gqlEntry(OrderListJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(OrderListHtml, $result); + $this->assertEquals([OrderListHtml], $arrayResult); + } + + public function testShouldReturnUnOrderListTagOnUnOrderList(): void + { + $jsonString = GQLTest::gqlEntry(UnorderListJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(UnorderListHtml, $result); + $this->assertEquals([UnorderListHtml], $arrayResult); + } + + public function testShouldReturnHrTagOnUnHr(): void + { + $jsonString = GQLTest::gqlEntry(HRJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals('
', $result); + $this->assertEquals(['
'], $arrayResult); + } + + public function testShouldReturnTableContentOnTable(): void + { + $jsonString = GQLTest::gqlEntry(TableJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(TableHtml, $result); + $this->assertEquals([TableHtml], $arrayResult); + } + + public function testShouldReturnBlockquoteTagOnBlockquote(): void + { + $jsonString = GQLTest::gqlEntry(BlockquoteJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(BlockquoteHtml, $result); + $this->assertEquals([BlockquoteHtml], $arrayResult); + } + + public function testShouldReturnCodeTagOnUnCode(): void + { + $jsonString = GQLTest::gqlEntry(CodeJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(CodeHtml, $result); + $this->assertEquals([CodeHtml], $arrayResult); + } + + public function testShouldReturnEmptyStringOnAssetReference(): void + { + $jsonString = GQLTest::gqlEntry(AssetReferenceJson); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals('', $result); + $this->assertEquals([''], $arrayResult); + } + + public function testShouldReturnEmbeddedAssetOnAssetReference(): void + { + $jsonString = GQLTest::gqlEntry(AssetReferenceJson, EmbedEdges); + $jsonObject = json_decode($jsonString); + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals(AssetReferenceHtml, $result); + $this->assertEquals([AssetReferenceHtml], $arrayResult); + } + + public function testShouldReturnEmbeddedEntryOnEntryBlockReference(): void + { + $jsonString = GQLTest::gqlEntry(EntryReferenceBlockJson, EmbedEdges); + $jsonObject = json_decode($jsonString); + $expectedResult = '

Update this title

Content type: content_block

'; + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals($expectedResult, $result); + $this->assertEquals([$expectedResult], $arrayResult); + } + + public function testShouldReturnEmbeddedEntryOnEntryLinkReference(): void + { + $jsonString = GQLTest::gqlEntry(EntryReferenceLinkJson, EmbedEdges); + $jsonObject = json_decode($jsonString); + $expectedResult = '/copy-of-entry-final-02'; + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals($expectedResult, $result); + $this->assertEquals([$expectedResult], $arrayResult); + } + + public function testShouldReturnEmbeddedEntryOnEntryInlineReference(): void + { + $jsonString = GQLTest::gqlEntry(EntryReferenceInlineJson, EmbedEdges); + $jsonObject = json_decode($jsonString); + $expectedResult = 'updated title'; + + $result = GQL::jsonToHtml($jsonObject->single_rte, new Option()); + $arrayResult = GQL::jsonToHtml($jsonObject->multiple_rte, new Option()); + + $this->assertEquals($expectedResult, $result); + $this->assertEquals([$expectedResult], $arrayResult); + } +} diff --git a/tests/Mock/JsonMock.php b/tests/Mock/JsonMock.php index 2283af5..9d2134a 100644 --- a/tests/Mock/JsonMock.php +++ b/tests/Mock/JsonMock.php @@ -47,3 +47,4 @@ define('HRJson', '{ "uid":"06e34a7 5e4 e549d", "_version":1, "attrs":{ }, "children":[{"uid":"f5a7b57 40a8a5c3 576828276b","type":"hr","children":[{"text":""}],"attrs":{ }}],"type":"doc"}'); define('H1NonChildJson', '{ "uid":"06e34a7a449d7fc2acd","_version":13,"attrs":{ },"children":[{ "type":"h1","attrs":{ },"uid":"c2dfed70 4d7030c65e2e1"}],"type":"doc"}'); +define('EmbedEdges', '{"edges":[{"node":{"system":{"content_type_uid":"sys_assets","uid":"blt9844"},"created_at":"2020-08-19T09:13:05.864Z","updated_at":"2020-09-10T09:35:28.393Z","created_by":"bltcreate","updated_by":"bltcreate","content_type":"image/png","file_size":"36743","filename":"svg-logo-text.png","url":"/v3/assets/svg-logo-text.png","_version":7,"title":"svg-logo-text.png","description":""}},{"node":{"system":{"content_type_uid":"sys_assets","uid":"blt44asset"},"created_at":"2020-08-19T09:13:32.785Z","updated_at":"2020-08-19T09:13:32.785Z","created_by":"bltcreate","updated_by":"bltcreate","content_type":"application/pdf","file_size":"13264","filename":"title","url":"URL","_version":1,"title":"title"}},{"node":{"title":"Update this title","url":"","locale":"en-us","system":{"uid":"blttitleuid","content_type_uid":"content_block"},"_version":5,"_in_progress":false,"multi_line":"","rich_text_editor":""}},{"node":{"title":"updated title","rich_text_editor":[""],"locale":"en-us","system":{"uid":"blttitleUpdateuid","content_type_uid":"embeddedrte"},"_in_progress":false}},{"node":{"title":"Entry with embedded entry","rich_text_editor":[""],"locale":"en-us","system":{"uid":"bltemmbedEntryuid","content_type_uid":"embeddedrte"},"_in_progress":false}},{"node":{"system":{"uid":"bltassetEmbuid","content_type_uid":"sys_assets"},"content_type":"image/png","file_size":"36743","filename":"svg-logo-text.png","url":"/v3/assets/blturl/bltassetEmbuid/svg-logo-text.png","title":"svg-logo-text.png","description":""}},{"node":{"title":"Update this title","url":"","locale":"en-us","system":{"uid":"blttitleuid","content_type_uid":"content_block"},"_version":5,"_in_progress":false,"multi_line":"","rich_text_editor":""}},{"node":{"title":"updated title","rich_text_editor":[""],"locale":"en-us","system":{"uid":"blttitleUpdateUID","content_type_uid":"embeddedrte"},"_in_progress":false}},{"node":{"title":"Entry with embedded entry","rich_text_editor":[""],"locale":"en-us","system":{"uid":"bltemmbedEntryUID","content_type_uid":"embeddedrte"},"_in_progress":false}}]}'); \ No newline at end of file