{"id":61091,"date":"2016-10-03T18:38:49","date_gmt":"2016-10-03T18:38:49","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=61091"},"modified":"2024-03-15T13:17:07","modified_gmt":"2024-03-15T13:17:07","slug":"parse-wysiwyg-editor-content-template-file","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/","title":{"rendered":"How To Parse WYSIWYG  Editor Content In Template File"},"content":{"rendered":"\n<p>When using a WYSIWYG editor, parsing directive tags like {{\u2026}} is necessary to obtain the correct output. Printing content directly without filtering may lead to unexpected results, so it&#8217;s best to filter the content before display.<\/p>\n\n\n\n<p><strong>As In Magento 1 we&nbsp;can use<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">Mage::helper(&#039;cms&#039;)-&gt;getPageTemplateProcessor()-&gt;filter($this-&gt;getContent());<\/pre>\n\n\n\n<p><strong>We will see How to do it in Magento 2.<\/strong><\/p>\n\n\n\n<p>Let us look into the Magento 2 core files, how do they do it.<\/p>\n\n\n\n<p>File:&nbsp;\/vendor\/magento\/module-cms\/Block\/Page.php<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\"> \/**\n     * Prepare HTML content\n     *\n     * @return string\n     *\/\n    protected function _toHtml()\n    {\n        $html = $this-&gt;_filterProvider-&gt;getPageFilter()-&gt;filter($this-&gt;getPage()-&gt;getContent());\n        return $html;\n    }<\/pre>\n\n\n\n<p>Similarly, we will gonna do this to filter the content of WYSIWYG editor.<br>To implement from the basics, create a custom WYSIWYG editor field in your custom form, in our case, we are creating it in Admin Config. Check the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1128\" height=\"600\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png\" alt=\"image-29\" class=\"wp-image-367035\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png 1128w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29-300x160.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29-250x133.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29-768x409.png 768w\" sizes=\"(max-width: 1128px) 100vw, 1128px\" loading=\"lazy\" \/><figcaption class=\"wp-element-caption\">WYSIWYG Editor<\/figcaption><\/figure>\n\n\n\n<p><br>Now, add a Directive in the above-created WYSIWYG editor.<\/p>\n\n\n\n<p>For example, if you want to add a directive for a custom block to render a template, use <strong>{{block class=<strong>&#8220;<\/strong>Vendor\\\\Module\\\\Block\\\\Index&#8221; area=<strong>&#8220;<\/strong>frontend&#8221;}} <\/strong>and inside this block, define a variable <strong>protected $_template = &#8220;example.phtml&#8221;<\/strong> to call that template on call of the above Directive.<\/p>\n\n\n\n<p> Now, save this in your database. After saving, your db value must be saved like this.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1113\" height=\"49\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-30.png\" alt=\"image-30\" class=\"wp-image-367042\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-30.png 1113w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-30-300x13.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-30-250x11.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-30-768x34.png 768w\" sizes=\"(max-width: 1113px) 100vw, 1113px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Now, create another Block for filtering the directive data. In your Block file create a function to return the filtered HTML content<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\n\/**\n * Webkul WYSIWYG Content Block.\n *\n * @category    Webkul\n * @package     Webkul_WYSIWYG\n * @author      Webkul Software Private Limited\n *\/\n\nnamespace Webkul\\WYSIWYG\\Block\\Content;\n\nuse Magento\\Store\\Model\\StoreManagerInterface;\n\nclass Content extends \\Magento\\Framework\\View\\Element\\Template\n{\n    \/**\n     * @var \\Magento\\Framework\\App\\Config\\ScopeConfigInterface\n     *\/\n    protected $_scopeConfig;\n    \n    \/**\n     * @var \\Magento\\Cms\\Model\\Template\\FilterProvider\n     *\/\n    protected $_filterProvider;\n\n    \/**\n     * Store manager\n     *\n     * @var \\Magento\\Store\\Model\\StoreManagerInterface\n     *\/\n    protected $_storeManager;\n\n    \/**\n     * @param \\Magento\\Backend\\Block\\Template\\Context    $context\n     * @param array                                      $data\n     *\/\n    public function __construct(\n        \\Magento\\Cms\\Model\\Template\\FilterProvider $filterProvider,\n        \\Magento\\Backend\\Block\\Template\\Context $context,\n        array $data = &#091;]\n    ) {\n        $this-&gt;_scopeConfig = $context-&gt;getScopeConfig();\n        $this-&gt;_storeManager = $context-&gt;getStoreManager();\n        $this-&gt;_filterProvider = $filterProvider;\n        parent::__construct($context, $data);\n    }\n\n    \/**\n     * Prepare layout.\n     *\n     * @return this\n     *\/\n    public function _prepareLayout()\n    {\n        $pageMainTitle = $this-&gt;getLayout()-&gt;getBlock(&#039;page.main.title&#039;);\n        if ($pageMainTitle) {\n            $pageMainTitle-&gt;setPageTitle(&#039;WYSIWYG Content&#039;);\n        }\n\n        return parent::_prepareLayout();\n    }\n\n    \n    \/**\n     * Prepare HTML content\n     *\n     * @return string\n     *\/\n    public function getCmsFilterContent($value=&#039;&#039;)\n    {\n        $html = $this-&gt;_filterProvider-&gt;getPageFilter()-&gt;filter($value);\n        return $html;\n    }\n}<\/pre>\n\n\n\n<p>Before filtering, your template would be rendered as below given image.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"616\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-34-1200x616.png\" alt=\"image-34\" class=\"wp-image-367047\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-34-1200x616.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-34-300x154.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-34-250x128.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-34-768x394.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-34.png 1320w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>In template file just call the function <strong>getCmsFilterContent()<\/strong> with the content to be filtered.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;div&gt;\n&lt;?php\t$html = $block-&gt;getCmsFilterContent($content); \/\/content to be filtered\t?&gt;\n\t&lt;p&gt;\n\t&lt;?php echo $html ?&gt;\n\t&lt;\/p&gt;\n&lt;\/div&gt;<\/pre>\n\n\n\n<p>After filtering the Directive, the data will be displayed as plain texts as you need.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"610\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-33-1200x610.png\" alt=\"image-33\" class=\"wp-image-367045\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-33-1200x610.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-33-300x153.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-33-250x127.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-33-768x391.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-33.png 1429w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>You can also learn How to get the WYSIYG editor in admin forms from my another post. &nbsp;<a href=\"http:\/\/webkul.com\/blog\/how-to-get-wysiwyg-editor-on-admin-forms-in-magento-2\/\">http:\/\/webkul.com\/blog\/how-to-get-wysiwyg-editor-on-admin-forms-in-magento-2\/<\/a><\/p>\n\n\n\n<p>If you have any query or feedback, please comment below. Thanks for reading. \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When using a WYSIWYG editor, parsing directive tags like {{\u2026}} is necessary to obtain the correct output. Printing content directly without filtering may lead to unexpected results, so it&#8217;s best to filter the content before display. As In Magento 1 we&nbsp;can use We will see How to do it in Magento 2. Let us look <a href=\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":116,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[80,8,302,1],"tags":[1195,3713,3716,3718,3714,3717,3715,3467],"class_list":["post-61091","post","type-post","status-publish","format-standard","hentry","category-cms","category-magento","category-magento2","category-uncategorized","tag-cms-2","tag-filter-cms-content","tag-getpagetemplateprocessor","tag-magento-2-cms-page","tag-parse-cms-content","tag-parse-directive-tags","tag-parse-wysiywg-content","tag-wysiwyg"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Parse WYSIWYG Editor Content In Template File - Webkul Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Parse WYSIWYG Editor Content In Template File - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"When using a WYSIWYG editor, parsing directive tags like {{\u2026}} is necessary to obtain the correct output. Printing content directly without filtering may lead to unexpected results, so it&#8217;s best to filter the content before display. As In Magento 1 we&nbsp;can use We will see How to do it in Magento 2. Let us look [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-03T18:38:49+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-15T13:17:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png\" \/>\n<meta name=\"author\" content=\"Ayaz Mittaqi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ayaz Mittaqi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/\"},\"author\":{\"name\":\"Ayaz Mittaqi\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/3a9d84d349b963ed99f7aead9372dd6d\"},\"headline\":\"How To Parse WYSIWYG Editor Content In Template File\",\"datePublished\":\"2016-10-03T18:38:49+00:00\",\"dateModified\":\"2024-03-15T13:17:07+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/\"},\"wordCount\":295,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png\",\"keywords\":[\"cms\",\"filter cms content\",\"getPageTemplateProcessor()\",\"magento 2 cms page\",\"parse cms content\",\"parse directive tags\",\"parse WYSIYWG content\",\"WYSIWYG\"],\"articleSection\":[\"CMS\",\"magento\",\"Magento2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/\",\"url\":\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/\",\"name\":\"How To Parse WYSIWYG Editor Content In Template File - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png\",\"datePublished\":\"2016-10-03T18:38:49+00:00\",\"dateModified\":\"2024-03-15T13:17:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png\",\"width\":1128,\"height\":600,\"caption\":\"image-29\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Parse WYSIWYG Editor Content In Template File\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/3a9d84d349b963ed99f7aead9372dd6d\",\"name\":\"Ayaz Mittaqi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/9a683a7c995567db93858f0305606f73f9075f82330789701e3ed345f6f830aa?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/9a683a7c995567db93858f0305606f73f9075f82330789701e3ed345f6f830aa?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Ayaz Mittaqi\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/ayaz-mittaqi024\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Parse WYSIWYG Editor Content In Template File - Webkul Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/","og_locale":"en_US","og_type":"article","og_title":"How To Parse WYSIWYG Editor Content In Template File - Webkul Blog","og_description":"When using a WYSIWYG editor, parsing directive tags like {{\u2026}} is necessary to obtain the correct output. Printing content directly without filtering may lead to unexpected results, so it&#8217;s best to filter the content before display. As In Magento 1 we&nbsp;can use We will see How to do it in Magento 2. Let us look [...]","og_url":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2016-10-03T18:38:49+00:00","article_modified_time":"2024-03-15T13:17:07+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png","type":"","width":"","height":""}],"author":"Ayaz Mittaqi","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Ayaz Mittaqi","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/"},"author":{"name":"Ayaz Mittaqi","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/3a9d84d349b963ed99f7aead9372dd6d"},"headline":"How To Parse WYSIWYG Editor Content In Template File","datePublished":"2016-10-03T18:38:49+00:00","dateModified":"2024-03-15T13:17:07+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/"},"wordCount":295,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png","keywords":["cms","filter cms content","getPageTemplateProcessor()","magento 2 cms page","parse cms content","parse directive tags","parse WYSIYWG content","WYSIWYG"],"articleSection":["CMS","magento","Magento2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/","url":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/","name":"How To Parse WYSIWYG Editor Content In Template File - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png","datePublished":"2016-10-03T18:38:49+00:00","dateModified":"2024-03-15T13:17:07+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/02\/image-29.png","width":1128,"height":600,"caption":"image-29"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/parse-wysiwyg-editor-content-template-file\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Parse WYSIWYG Editor Content In Template File"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/3a9d84d349b963ed99f7aead9372dd6d","name":"Ayaz Mittaqi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/9a683a7c995567db93858f0305606f73f9075f82330789701e3ed345f6f830aa?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9a683a7c995567db93858f0305606f73f9075f82330789701e3ed345f6f830aa?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Ayaz Mittaqi"},"url":"https:\/\/webkul.com\/blog\/author\/ayaz-mittaqi024\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/61091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/116"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=61091"}],"version-history":[{"count":10,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/61091\/revisions"}],"predecessor-version":[{"id":427839,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/61091\/revisions\/427839"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=61091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=61091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=61091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}