How to Get WYSIWYG Editor’s data in Magento 2 Frontend

How to Get WYSIWYG Editor's data in Magento 2 Frontend

The technique to add WYSIWYG editor in Magento 2 system configuration makes the admin’s task much easier to work with content editing.  Have you checked the frontend after implementing WYSIWYG editor in the admin configuration?

Strange output, isn’t it? 😕

You can see the inability of the WYSIWYG editor to convert the HTML content.

Magento 2 fails to convert WYSIWYG content into the readable format in the condition when the content has been added from the WYSIWYG editor from the configuration section. To resolve the issue and get WYSIWYG editor’s data in Magento 2 frontend, follow the below method:

Method to Get WYSIWYG Editor’s data in Magento 2 Frontend:

  1. Create registration.php file in app\code\[Vendor]\[Namespace]\
  2. Create module.xml file in app\code\[Vendor]\[Namespace]\etc
  3. Create ConfigBlock.php file in app\code\[Vendor]\[Namespace]\Helper


That’s it.

Now you can use the WYSIWYG editor in the system configuration, and at the same get proper output in the frontend!

Feel free to post your doubts in the Comments section below and I’d be happy to help.


Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

(based on 10 Reviews)

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. Owing to his contributions in Magento Forums and posting solutions, he is among the top 50 contributors of the Magento community in 2019. When he is not engrossed with anything related to Magento, he loves to play cricket.

Leave a reply:

Your email address will not be published.