{"id":2621,"date":"2013-09-19T12:38:07","date_gmt":"2013-09-19T12:38:07","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=2621"},"modified":"2024-02-23T06:51:35","modified_gmt":"2024-02-23T06:51:35","slug":"add-wysiwyg-functionality-magento-config-items","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/","title":{"rendered":"How to add WYSIWYG functionality to Magento Config items"},"content":{"rendered":"\n<p>First of all add this in any layout file, to load the editor in the config section:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;adminhtml_system_config_edit&gt;\n    &lt;update handle=&quot;editor&quot;\/&gt;\n    &lt;reference name=&quot;head&quot;&gt;\n        &lt;action method=&quot;setCanLoadTinyMce&quot;&gt;&lt;load&gt;1&lt;\/load&gt;&lt;\/action&gt;\n    &lt;\/reference&gt;\n&lt;\/adminhtml_system_config_edit&gt;<\/pre>\n\n\n\n<p>Now create your own field renderer. It has to be a block inside your module:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;?php\nclass Namespace_Module_Block_Adminhtml_System_Config_Editor extends \nMage_Adminhtml_Block_System_Config_Form_Field \nimplements Varien_Data_Form_Element_Renderer_Interface{\n    protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element){\n        $element-&gt;setWysiwyg(true);\n        $element-&gt;setConfig(Mage::getSingleton(&#039;cms\/wysiwyg_config&#039;)-&gt;getConfig());\n        return parent::_getElementHtml($element);\n    }\n}<\/pre>\n\n\n\n<p>Now for the element inside the system.xml set the frontend_type &#8216;editor&#8217; and the frontend_model your new block<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&lt;fieldname translate=&quot;label&quot;&gt;\n    &lt;label&gt;Field label &lt;\/label&gt;\n    &lt;frontend_type&gt;editor&lt;\/frontend_type&gt;\n    &lt;frontend_model&gt;module\/adminhtml_system_config_editor&lt;\/frontend_model&gt;\n    &lt;sort_order&gt;150&lt;\/sort_order&gt;\n    &lt;show_in_default&gt;1&lt;\/show_in_default&gt;\n    &lt;show_in_website&gt;1&lt;\/show_in_website&gt;\n    &lt;show_in_store&gt;1&lt;\/show_in_store&gt;\n&lt;\/fieldname&gt;<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>First of all add this in any layout file, to load the editor in the config section: Now create your own field renderer. It has to be a block inside your module: Now for the element inside the system.xml set the frontend_type &#8216;editor&#8217; and the frontend_model your new block<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-2621","post","type-post","status-publish","format-standard","hentry","category-magento"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to add WYSIWYG functionality to Magento Config items - 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\/add-wysiwyg-functionality-magento-config-items\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to add WYSIWYG functionality to Magento Config items - Webkul Blog\" \/>\n<meta property=\"og:description\" content=\"First of all add this in any layout file, to load the editor in the config section: Now create your own field renderer. It has to be a block inside your module: Now for the element inside the system.xml set the frontend_type &#8216;editor&#8217; and the frontend_model your new block\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/\" \/>\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=\"2013-09-19T12:38:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-02-23T06:51:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Abhishek Singh\" \/>\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=\"Abhishek Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/\"},\"author\":{\"name\":\"Abhishek Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0\"},\"headline\":\"How to add WYSIWYG functionality to Magento Config items\",\"datePublished\":\"2013-09-19T12:38:07+00:00\",\"dateModified\":\"2024-02-23T06:51:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/\"},\"wordCount\":61,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"articleSection\":[\"magento\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/\",\"url\":\"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/\",\"name\":\"How to add WYSIWYG functionality to Magento Config items - Webkul Blog\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2013-09-19T12:38:07+00:00\",\"dateModified\":\"2024-02-23T06:51:35+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to add WYSIWYG functionality to Magento Config items\"}]},{\"@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\/573e459f54796eb4195511990de4bfd0\",\"name\":\"Abhishek Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?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\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Abhishek Singh\"},\"description\":\"Adobe Commerce certified Magento developer with over 12 years of experience at Webkul. Passionate about scalable Magento 2-based webshops, AI, and multi-channel integrations, Abhishek consistently delivers innovative and efficient e-commerce solutions that propel businesses forward.\",\"sameAs\":[\"http:\/\/webkul.com\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/abhishek\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to add WYSIWYG functionality to Magento Config items - 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\/add-wysiwyg-functionality-magento-config-items\/","og_locale":"en_US","og_type":"article","og_title":"How to add WYSIWYG functionality to Magento Config items - Webkul Blog","og_description":"First of all add this in any layout file, to load the editor in the config section: Now create your own field renderer. It has to be a block inside your module: Now for the element inside the system.xml set the frontend_type &#8216;editor&#8217; and the frontend_model your new block","og_url":"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2013-09-19T12:38:07+00:00","article_modified_time":"2024-02-23T06:51:35+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png","type":"image\/png"}],"author":"Abhishek Singh","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Abhishek Singh","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/"},"author":{"name":"Abhishek Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/573e459f54796eb4195511990de4bfd0"},"headline":"How to add WYSIWYG functionality to Magento Config items","datePublished":"2013-09-19T12:38:07+00:00","dateModified":"2024-02-23T06:51:35+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/"},"wordCount":61,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"articleSection":["magento"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/","url":"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/","name":"How to add WYSIWYG functionality to Magento Config items - Webkul Blog","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2013-09-19T12:38:07+00:00","dateModified":"2024-02-23T06:51:35+00:00","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/add-wysiwyg-functionality-magento-config-items\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to add WYSIWYG functionality to Magento Config items"}]},{"@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\/573e459f54796eb4195511990de4bfd0","name":"Abhishek Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?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\/d4ac7e0e671bf743359d7e3f140c262d1b16d71106f0a1aeaecca327a2805ae4?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Abhishek Singh"},"description":"Adobe Commerce certified Magento developer with over 12 years of experience at Webkul. Passionate about scalable Magento 2-based webshops, AI, and multi-channel integrations, Abhishek consistently delivers innovative and efficient e-commerce solutions that propel businesses forward.","sameAs":["http:\/\/webkul.com"],"url":"https:\/\/webkul.com\/blog\/author\/abhishek\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/2621","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\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=2621"}],"version-history":[{"count":2,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/2621\/revisions"}],"predecessor-version":[{"id":423971,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/2621\/revisions\/423971"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=2621"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=2621"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=2621"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}