Magento – Add a wysiwyg editor in custom category attribute

attributescategorymagento-1.7wysiwyg

I have added a WYSIWYG editor in extension so that one can add a WYSIWYG editor in the attribute. So i added these think in the main.php

  array(
        'value' => 'wysiwyg',
        'label' => Mage::helper('catalog')->__('WYSIWYG Editor')
    ),

Now what i do for get the WYSIWYG editor in the category.

Best Answer

The wysiwyg editor is available on the textarea type input. So if you are using the installer script to add your attribute for example use these options. Don't forget to append the other options you might need there like label.

$installer->addAttribute(Mage_Catalog_Model_Category::ENTITY, 'your_attribute', array(
   [...]
   'type' => 'text',
   'input' => 'textarea',
   'wysiwyg_enabled'   => true,
   [...]
));