How to disable WYSIWYG editor in Magento 2 and reasons not to use it.
WYSIWYG (What You See Is What You Get) may sound convenient, but in Magento 2 it can often cause issues. The editor tends to insert unwanted spaces or alter formatting, which can break layouts when editing existing pages or blocks.
To avoid these problems, you can disable the WYSIWYG editor and work directly with clean HTML code.
How to Disable WYSIWYG in Magento 2
- Log in to your Magento Admin Panel.
- Navigate to Stores > Configuration > General > Content Management.
- Find the setting Enable WYSIWYG Editor.
- From the dropdown, select Disabled by Default.

Why Disable WYSIWYG?
- Cleaner Code – Prevents the editor from inserting unnecessary tags or spacing.
- Consistent Formatting – Reduces the risk of Magento saving content in the wrong format.
- Better Control – Gives developers and store managers full control over HTML structure.
By disabling the WYSIWYG editor, you ensure your custom layouts and styles remain intact without interference from automated formatting.
Updated on: 18/09/2025
Thank you!
