protected function _prepareLayout()
{
$return = parent::_prepareLayout();
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
}
return $return;
}
I have a custom module with an admin grid. I try to use TinyMCE but it gives an error in console as described in this title. I use the following code
$fieldset->addField("preface", "editor", array(
"label" => Mage::helper("knowledgebase")->__("Preface"),
'style' => 'width:98%; height:300px;',
'wysiwyg' => true,
'config' => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
"name" => "preface",
));
protected function _prepareLayout()
{
$return = parent::_prepareLayout();
if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
$this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
}
return $return;
}
app\design\adminhtml\default\default\layout\my-module.xml– Adrian Moisa Sep 27 '16 at 12:56