{"id":2358,"date":"2020-10-16T06:54:36","date_gmt":"2020-10-16T06:54:36","guid":{"rendered":"https:\/\/mindfusion.eu\/blog\/?p=2358"},"modified":"2021-01-25T16:19:39","modified_gmt":"2021-01-25T16:19:39","slug":"using-controlnode-s-in-the-javascript-diagram","status":"publish","type":"post","link":"https:\/\/mindfusion.dev\/blog\/using-controlnode-s-in-the-javascript-diagram\/","title":{"rendered":"Using ControlNode-s in the JavaScript Diagram"},"content":{"rendered":"<p>In this blog post we will look on how to build <a title=\"MindFusion Diagramming Library for JavaScript: ControlNode\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?T_MindFusion_Diagramming_ControlNode_Members_0.htm\">ControlNode<\/a> -s with Mindusion Diagramming library for JavaScript. We will create a web page that creates a template for cooking recipes. Each recipe is a <a title=\"MindFusion Diagramming Library for JavaScript: DiagramNode\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?CC_T_MindFusion_Diagramming_DiagramNode_Members_0.htm\">DiagramNode<\/a> . Rows in the table with ingredients can be added or removed dynamically with buttons. When you click on the recipe image, a browse dialog appears and you can point to another one.<\/p>\n<p>You can test the page yourself:<\/p>\n<p align=\"center\"><a title=\"JavaScript Diagram: Control Nodes\" href=\"https:\/\/mindfusion.dev\/samples\/javascript\/diagram\/RecipeNodes\/RecipeNodes.html\"> <img decoding=\"async\" title=\"JavaScript Diagram: Control Nodes\" src=\"https:\/\/mindfusion.dev\/product_images\/javascript\/library\/diagram\/recipeNodes_jsdiagram.png\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<p><strong>I. General Settings<\/strong><\/p>\n<p>We need a blank HTML page and a blank JavaScript file, which will hold the code for the application.<\/p>\n<p>We add links to three JavaScript files. We add them at the end of the web page, right before the closing BODY tag:<\/p>\n<pre>&lt;script src=\"MindFusion.Common.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\n&lt;script src=\"MindFusion.Diagramming.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;\n&lt;script src=\"RecipeNodes.js\" type=\"text\/javascript\"&gt;&lt;\/script&gt;<\/pre>\n<p>In the web page we need two Canvas elements: one for the diagram and one for an overview control. The <a title=\"MindFusion Diagramming Library for JavaScript: Overview\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?T_MindFusion_Diagramming_Overview_Members.htm\">Overview<\/a> control shows a mini-version of the diagram. It is convinient but not necessary in order to render a flowchart.<\/p>\n<pre>&lt;div id=\"content\" style=\"top: 60px; bottom: 24px;\"&gt;\n        &lt;div style=\"position: absolute; left: 0px; top: 0px; bottom: 0px; width: 200px; border-right: 1px solid #e2e4e7;\n\t\t\toverflow: hidden; vertical-align: top;\"&gt;\n            &lt;!-- The Overview component is bound to the canvas element below --&gt;\n            &lt;div style=\"position: absolute; top: 0px; bottom: 0px; right: 0px; width: 200px;\n\t\t\t\theight: 200px; border-bottom: 1px solid #e2e4e7; background-color: #c0c0c0;\"&gt;\n                &lt;canvas id=\"overview\" width=\"200\" height=\"200\"&gt;\n                &lt;\/canvas&gt;\n            &lt;\/div&gt;            \n        &lt;\/div&gt;\n        &lt;!-- The Diagram component is bound to the canvas element below --&gt;\n        &lt;div style=\"position: absolute; left: 200px; top: 0px; right: 0px; bottom: 0px; overflow: auto;\"&gt;\n            &lt;canvas id=\"diagram\" width=\"2100\" height=\"2100\"&gt;\n                This page requires a browser that supports HTML 5 Canvas element.\n            &lt;\/canvas&gt;\n        &lt;\/div&gt;\n        &lt;!-- The ZoomControl component is bound to the canvas element below --&gt;\n        &lt;div style=\"width: 50px; height: 300px; position: absolute; top: 20px; right: 35px;\n\t\t\twidth: 50px; height: 300px;z-index:3;\"&gt;\n            &lt;canvas id=\"zoomer\" width=\"50\" height=\"300\"&gt;\n            &lt;\/canvas&gt;\n        &lt;\/div&gt;\n    &lt;\/div&gt;<\/pre>\n<p>We also add a <a title=\"MindFusion Diagramming Library for JavaScript: ZoomControl\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?T_MindFusion_Controls_ZoomControl_Members.htm\">ZoomControl<\/a> control and we provide all HTML controls with an id. This is important because we need this id to refer to the Canvas elements from JavaScript code.<\/p>\n<p>We&#8217;ve also added some CSS styling options to the web page. They are meant to make the HTML controls that we will embed in our<br \/>\ncontrol node prettier.<\/p>\n<p><strong>II. The Controls<\/strong><\/p>\n<p>Now that we have set up all code in the web page, we start coding the JavaScript code-behind file. We add some namespace mappings, to make the code shorter. If you are using Visual Studio Code, you can add the TypeScript definitions of the Diagram library. This will enable IntelliSense support while you code.<\/p>\n<p align=\"center\"><img decoding=\"async\" title=\"JavaScript Diagram: IntelliSense Support\" src=\"https:\/\/mindfusion.dev\/product_images\/javascript\/library\/diagram\/jsdiagram_intellisense.png\" \/><\/p>\n<p>We handle the DOMCOntentLoaded event of the initial HTML document to initialize the MindFusion controls.<\/p>\n<pre>document.addEventListener(\"DOMContentLoaded\", function ()\n{\n\t \/\/ create a Diagram component that wraps the \"diagram\" canvas\n    var diagram = Diagram.create(document.getElementById(\"diagram\"));\n    diagram.setVirtualScroll(true);\n    diagram.setBehavior(Behavior.LinkControls);    \n\n    \/\/ create an Overview component that wraps the \"overview\" canvas\n    var overview = MindFusion.Diagramming.Overview.create(document.getElementById(\"overview\"));\n    overview.setDiagram(diagram);\n\n    \/\/ create an ZoomControl component that wraps the \"zoomer\" canvas\n    var zoomer = MindFusion.Controls.ZoomControl.create(document.getElementById(\"zoomer\"));\n    zoomer.setTarget(diagram);\n}});<\/pre>\n<p>We get the HTML element that corresponds to each of the three Canvas elements that we have created in the web page. We use the document.getElementById of the Web API. You see now that we query the document using the id-s of the Canvas elements, which we have previously specified.<\/p>\n<p>The <a title=\"MindFusion Diagramming Library for JavaScript: Overview\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?T_MindFusion_Diagramming_Overview_Members.htm\">Overview<\/a> and <a title=\"MindFusion Diagramming Library for JavaScript: ZoomControl\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?T_MindFusion_Controls_ZoomControl.htm\">ZoomControl<\/a> instances use the <a title=\"MindFusion Diagramming Library for JavaScript: setDiagram\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?M_MindFusion_Diagramming_Overview_setDiagram_1_Diagram.htm\">setDiagram<\/a> and <a title=\"MindFusion Diagramming Library for JavaScript: setTarget\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?M_MindFusion_Controls_ZoomControl_setTarget_1_Control.htm\">setTarget<\/a> methods prespectively, to specify the <a title=\"MindFusion Diagramming Library for JavaScript: Diagram\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?CC_T_MindFusion_Diagramming_Diagram_0.htm\">Diagram<\/a> instance, to which they should be bound.<\/p>\n<p><strong>III. The Node Template<\/strong><\/p>\n<p>The <a title=\"MindFusion Diagramming Library for JavaScript: ControlNode\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?T_MindFusion_Diagramming_ControlNode_0.htm\">ControlNode<\/a> class allows us to use plain HTML in order to initialize the look of a <a title=\"MindFusion Diagramming Library for JavaScript: ControlNode\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?T_MindFusion_Diagramming_ControlNode_0.htm\">ControlNode<\/a> This is done with the setTemplate method. You can specify different templates for each instance of <a title=\"MindFusion Diagramming Library for JavaScript: ControlNode\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?T_MindFusion_Diagramming_ControlNode_0.htm\">ControlNode<\/a> that you create.<\/p>\n<pre>var node1 = new MindFusion.Diagramming.ControlNode(diagram);\n        node1.setTemplate(`&lt;input value=\"Cupcakes\" data-interactive=\"true\"&gt;&lt;\/input&gt;\n\t&lt;div style=\"padding:10px\"&gt;&lt;img width=\"70\" height=\"70\" title=\"Click to choose picture\" style=\"float:left\" src=\"data:image\/png;base64,${placeholderBase64}\" data-interactive=\"true\" data-event-click=\"placeholderClick\" \/&gt;&lt;table width=\"50%\"&gt;&lt;tr&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;softened butter&lt;\/td&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;110g&lt;\/td&gt;&lt;\/tr&gt;&lt;tr&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;golden caster sugar&lt;\/td&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;110g&lt;\/td&gt;&lt;\/tr&gt;&lt;tr&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;large eggs&lt;\/td&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;2&lt;\/td&gt;&lt;\/tr&gt;&lt;tr&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;vanilla extract&lt;\/td&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;\u00bd tsp&lt;\/td&gt;&lt;\/tr&gt;\n&lt;tr&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;self-raising flour&lt;\/td&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;110g&lt;\/td&gt;&lt;\/tr&gt;&lt;\/table&gt;&lt;\/div&gt;\n\t&lt;button data-interactive=\"true\" data-event-click=\"addRow\"&gt;Add Ingredient&lt;\/button&gt;\n\t&lt;button data-interactive=\"true\" data-event-click=\"removeRow\"&gt;Remove Ingredient&lt;\/button&gt;\n\t&lt;div style=\"width: 100%;\"&gt;&lt;textarea id=\"w3review\" name=\"w3review\"  rows=\"4\" columns=\"50\" data-interactive=\"true\"&gt;\n  Using an electric whisk beat 110g softened butter and 110g golden caster sugar together until pale and fluffy then whisk in 2 large eggs, one at a time, scraping down the sides of the bowl after each addition.\nAdd \u00bd tsp vanilla extract, 110g self-raising flour and a pinch of salt, whisk until just combined then spoon the mixture into the cupcake cases.\n  &lt;\/textarea&gt;&lt;\/div&gt;`);\n        node1.setBounds(new Rect(40, 20, 100, 100))\n        diagram.addItem(node1);<\/pre>\n<p>We also use <a title=\"MindFusion Diagramming Library for JavaScript: setBounds\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?M_MindFusion_Diagramming_DiagramNode_setBounds_2_Rect_Boolean.htm\">setBounds<\/a> to specify the location of the new <a title=\"MindFusion Diagramming Library for JavaScript: DiagramNode\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?CC_T_MindFusion_Diagramming_DiagramNode_Members_0.htm\">DiagramNode<\/a> on the diagram&#8217;s work area. It is also important to add the new node to the collection of <a title=\"MindFusion Diagramming Library for JavaScript: DiagramItem\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?CC_T_MindFusion_Diagramming_DiagramItem_Members_0.htm\">DiagramItem<\/a> -s with <a title=\"MindFusion Diagramming Library for JavaScript: addItem\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?M_MindFusion_Diagramming_Diagram_addItem_1_DiagramItem.htm\">addItem<\/a> if we open the web page in browser, we will see the recipe node for cupcakes. If we create new nodes, however, we will see that they render as default white rectangles:<\/p>\n<p align=\"center\"><img decoding=\"async\" title=\"Diagram Nodes without Template\" src=\"https:\/\/mindfusion.dev\/product_images\/javascript\/library\/diagram\/diagram_noTemplate.png\" \/><\/p>\n<p>In order to change that we need to replace the default templates for nodes of the <a title=\"MindFusion Diagramming Library for JavaScript: Diagram\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?CC_T_MindFusion_Diagramming_Diagram_0.htm\">Diagram<\/a> with a custom one: our recipe node. Here is the new template:<\/p>\n<pre> var defaultTemplate = `\n&lt;input placeholder=\"Recipe Title\" data-interactive=\"true\"&gt;&lt;\/input&gt;\n\t&lt;div style=\"padding:10px\"&gt;&lt;img width=\"70\" height=\"70\" title=\"Click to choose picture\" style=\"float:left\" src=\"data:image\/png;base64,${placeholderBase64}\" \/&gt;&lt;table width=\"50%\"&gt;&lt;tr&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;Milk&lt;\/td&gt;&lt;td contenteditable='true' data-interactive=\"true\"&gt;1 cup&lt;\/td&gt;&lt;\/tr&gt;&lt;\/table&gt;&lt;\/div&gt;\n\n\t&lt;div&gt;&lt;button&gt;Add Ingredient&lt;\/button&gt;\n\t&lt;button&gt;Remove Ingredient&lt;\/button&gt;\n\t&lt;div&gt;&lt;textarea id=\"w3review\" name=\"w3review\"  rows=\"4\" columns=\"50\" data-interactive=\"true\"&gt;\n  Preparation\n  &lt;\/textarea&gt;&lt;\/div&gt;`;<\/pre>\n<p>Now we can call the <a title=\"MindFusion Diagramming Library for JavaScript: setDefaultControlTemplate\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?M_MindFusion_Diagramming_Diagram_setDefaultControlTemplate_1_String.htm\">setDefaultControlTemplate<\/a> method to tell the <a title=\"MindFusion Diagramming Library for JavaScript: Diagram\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?CC_T_MindFusion_Diagramming_Diagram_0.htm\">Diagram<\/a> that from now on, when new <a title=\"MindFusion Diagramming Library for JavaScript: DiagramNode\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?CC_T_MindFusion_Diagramming_DiagramNode_0.htm\">DiagramNode<\/a> -s are created, they will have this template:<\/p>\n<pre>diagram.setDefaultControlTemplate(defaultTemplate);<\/pre>\n<p><strong>IV. Interactivity<\/strong><\/p>\n<p>When we create a new node, the table renders with a sample row, which you cannot edit. The same is with the title. If we want to make the controls editable we need to set the data-interractive atribute:<\/p>\n<pre>&lt;div&gt;&lt;button data-interactive=\"true\" data-event-click=\"addRow\"&gt;Add Ingredient&lt;\/button&gt;<\/pre>\n<p>As a rule each <a title=\"MindFusion Diagramming Library for JavaScript: ControlNode\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?T_MindFusion_Diagramming_ControlNode_0.htm\">ControlNode<\/a> exposes various attributes, which are accessible through the following syntax:<\/p>\n<pre> data-attributeName=\"value\"<\/pre>\n<p>As you see from the code above, there is data-event-click attribute. This attribute specifies the event handler of the click event for the button that is rendered in the node. Here it is:<\/p>\n<pre>function addRow(e, sender)\n{\n\tvar table = sender.getContent().getElementsByTagName(\"table\")[0];\n\t\n\t\n\t  var rows = table.getElementsByTagName('tr');\n\t  if(rows.length &gt; 0)\n      {\n\t\t   var clone = rows[rows.length - 1].cloneNode(true); \n           table.appendChild(clone);\n\t  }\n\t  else\n\t  {\n\t\t  var tr = document.createElement('tr');\n           \n          var td = document.createElement('td');\n         td.appendChild(document.createTextNode('Milk'))\n         td.setAttribute('contenteditable', 'true');\n\t\t td.setAttribute('data-interactive', 'true');\n         tr.appendChild(td);\n\t\t \n\t\t td = document.createElement('td');\n         td.appendChild(document.createTextNode('1 cup'))\n         td.setAttribute('contenteditable', 'true');\n\t\t td.setAttribute('data-interactive', 'true');\n         tr.appendChild(td);\n\t\t \n\t\t table.appendChild(tr);\n      }\n}<\/pre>\n<p>In the event handler we check if there are rows in the table, and if yes &#8211; we copy the first one. If there are no rows, we add a new row with default data. The data-event-eventName is the syntax to handle any event that is available on the HTML control that you have included in the <a title=\"MindFusion Diagramming Library for JavaScript: ControlNode\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?T_MindFusion_Diagramming_ControlNode_Members_0.htm\">ControlNode<\/a> is how we specify that the image of a cupcake is clickable:<\/p>\n<pre>&lt;img width=\"70\" height=\"70\" title=\"Click to choose picture\" style=\"float:left\" src=\"data:image\/png;base64,${placeholderBase64}\" data-interactive=\"true\" data-event-click=\"placeholderClick\" \/&gt;<\/pre>\n<p>As you see, it is interactive and we handle the click event on it. Once we click on the image, a dialog renders and we can choose a new image:<\/p>\n<pre>function placeholderClick(e, sender)\n{\n    var input = document.createElement(\"input\");\n    input.type = \"file\";\n    var img = e.target;\n    input.addEventListener('change', e =&gt;\n    {\n        Utils.toDataUrl(URL.createObjectURL(e.target.files[0]), function (base64str)\n        {\n            img.src = base64str;\n            sender.setTag(base64str);\n            sender.createImage();\n        });\n    })\n    input.click();\n}<\/pre>\n<p>When a new image is chosen, we assign its Base64 represenation as source to the image element that is in our <a title=\"MindFusion Diagramming Library for JavaScript: ControlNode\" href=\"https:\/\/www.mindfusion.dev\/onlinehelp\/jsdiagram\/index.htm?T_MindFusion_Diagramming_ControlNode_Members_0.htm\">ControlNode<\/a> template, which represents cooking recipes.<\/p>\n<p>And these were all the steps you need to make in order to get interactive, recipe nodes with customizable count of ingredients, title and image.<\/p>\n<p>You can download the source code from:<\/p>\n<p align=\"center\"><a title=\"JavaScript Diagram: Recipe Nodes\" href=\"https:\/\/mindfusion.dev\/samples\/javascript\/diagram\/RecipeNodes.zip\">Download Recipe Nodes JavaScript Diagram Sample<\/a><\/p>\n<p>Technical support is available through MindFusion <a title=\"Js Diagram Discussion Board\" href=\"https:\/\/mindfusion.dev\/Forum\/YaBB.pl?board=jsdiag_disc\">forum here.<\/a><\/p>\n<p><i>About Diagramming for JavaScript:<\/i> This native JavaScript library provides developers with the ability to create and customize any type of diagram, decision tree, flowchart, class hierarchy, graph, genealogy tree, BPMN diagrams and much more. The control offers rich event set, numerous customization options, animations, graph operations, styling and themes. You have more than 100 predefined nodes, table nodes and more than 15 automatic layout algorithms. Learn more about Diagramming for JavaScript at <a title=\"JavaScript Diagram Library\" href=\"https:\/\/mindfusion.dev\/javascript-diagram.html\">https:\/\/mindfusion.dev\/javascript-diagram.html<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog post we will look on how to build ControlNode -s with Mindusion Diagramming library for JavaScript. We will create a web page that creates a template for cooking recipes. Each recipe is a DiagramNode . Rows in &hellip; <a href=\"https:\/\/mindfusion.dev\/blog\/using-controlnode-s-in-the-javascript-diagram\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[95,513],"tags":[653,473,491],"class_list":["post-2358","post","type-post","status-publish","format-standard","hentry","category-diagramming-2","category-javascript","tag-interactive-flowchart","tag-javascript-diagram","tag-js-flowchart"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3RlKs-C2","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts\/2358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/comments?post=2358"}],"version-history":[{"count":9,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts\/2358\/revisions"}],"predecessor-version":[{"id":2660,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/posts\/2358\/revisions\/2660"}],"wp:attachment":[{"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/media?parent=2358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/categories?post=2358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mindfusion.dev\/blog\/wp-json\/wp\/v2\/tags?post=2358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}