Considering custom module Bd_Demo
Add following function in Bd_Demo_Block_Adminhtml_Demo_Edit
protected function _prepareLayout() {
parent::_prepareLayout();
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
}
}
Then use as in grid from Bd_Demo_Block_Adminhtml_Demo_Edit_Tab_Form
$fieldset->addField("wood_description", "editor", array(
"label" => Mage::helper("woodflooring")->__("Description"),
"class" => "required-entry",
"required" => true,
"name" => "wood_description",
'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
'wysiwyg' => true,
));
Add following function in Bd_Demo_Block_Adminhtml_Demo_Edit
protected function _prepareLayout() {
parent::_prepareLayout();
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
}
}
Then use as in grid from Bd_Demo_Block_Adminhtml_Demo_Edit_Tab_Form
$fieldset->addField("wood_description", "editor", array(
"label" => Mage::helper("woodflooring")->__("Description"),
"class" => "required-entry",
"required" => true,
"name" => "wood_description",
'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
'wysiwyg' => true,
));
No comments:
Post a Comment