How to show WYSIWYG editor for product description in magento 1.7, without having it in a popup?

How to show WYSIWYG editor for product description in magento 1.7, without having it in a popup?

September 15, 2026 · Illustrated author avatarBy Stefan Bogdanescu
How to show WYSIWYG editor for product description in magento 1.7, without having it in a popup?

Enabling WYSIWYG Editor for Product Description in Magento 1.7

Are you struggling to modify the product description field in your Magento 1.7 store to display the WYSIWYG editor by default? You’re not alone. Many merchants find this task challenging, but with a little bit of code tweaking, it’s entirely possible.

Understanding the Current Setup

By default in Magento 1.7, the WYSIWYG editor is hidden behind a button labeled “WYSIWYG Editor”. When you click this button, a popup appears with the text area for editing your product description. This design aims to keep the admin interface clean and organized.

However, if you want to streamline the process by showing the WYSIWYG editor directly in the product edit page without any additional clicks, you’ll need to modify some core files.

Modifying the Adminhtml Block

The primary file responsible for this functionality is app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php. This block handles the rendering of the product edit form in the admin panel.

To enable the WYSIWYG editor by default, you need to modify the _beforeToHtml method. Look for the following lines of code:

$renderer = $this->getLayout()->createBlock('adminhtml/cms_wysiwyg');
if ($renderer) {
    $editorType = 'editor';
    if ($model->getEditorType()) {
        $editorType = $model->getEditorType();
    }
    if (is_string($model)) {
        $model = Mage::registry('product');
    }
    if (!$model instanceof Mage_Catalog_Model_Product) {
        $model = new Varien_Object();
    }
}

Here, we’re creating an instance of the Mage_Adminhtml_Block_Cms_Wysiwyg block (which is responsible for rendering the WYSIWYG editor). However, this is only done when the “WYSIWYG Editor” button is clicked.

Enabling WYSIWYG by Default

To show the WYSIWYG editor without a click, you need to move this code above the if condition. This will ensure that the WYSIWYG block is created regardless of any button clicks.

$renderer = $this->getLayout()->createBlock('adminhtml/cms_wysiwyg');
$editorType = 'editor';

After moving the code, your _beforeToHtml method should look like this:

protected function _beforeToHtml()
{
    if ($model = Mage::registry('product')) {
        $this->setProduct($model);
    }
    else {
        $model = new Varien_Object();
    }

    if (isset($_GET['type'])) {
        switch ($_GET['type']) {
            case 'product':
                break;
        }
    }

    // Add this line here
    $renderer = $this->getLayout()->createBlock('adminhtml/cms_wysiwyg');
    $editorType = 'editor';

    // Rest of the method remains unchanged
}

Modifying the Product Form

The next step involves modifying the product form in app/design/adminhtml/default/default/template/catalog/product/edit.phtml to include the WYSIWYG editor.

You need to replace this line:

<textarea name="description" style="width:100%; height:35em;" id="description"><?php echo $this->escapeHtml($this->getProduct()->getDescription()) ?></textarea>

With this one:

<?php echo $this->getChildHtml('form.description') ?>

This line tells Magento to render the editor child block, which is the WYSIWYG editor.

Conclusion

Enabling the WYSIWYG editor for product description by default in Magento 1.7 involves a bit of core file modification. By changing the app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php and app/design/adminhtml/default/default/template/catalog/product/edit.phtml files, you can eliminate the need for users to click the “WYSIWYG Editor” button.

Remember, modifying core files is not recommended by Magento, as it may cause issues while upgrading your store in the future. Always take a backup of these files before making any changes.

If you’re looking for a more sustainable solution that doesn’t involve core file modification, consider using an extension like the Enhanced WYSIWYG Editor from Laravel Company. This extension provides advanced WYSIWYG editing capabilities without requiring any core modifications.

Enhancing your product description editing experience can greatly improve the efficiency of your Magento store’s administration. Don’t hesitate to reach out if you have any further questions or need assistance with this process!

Magento 1 Catalog Themes Admin

Our network