在mangento后台调用wysiwyg编辑器

在mangento后台调用操蛋的wysiwyg编辑器:

1.在头部加载TincyMCE

  protected function _prepareLayout() {
    parent::_prepareLayout();
    if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {
        $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);
    }
2.
$fieldset->addField('content', 'editor', array(
    'name'      => 'content',
    'label'     => Mage::helper('demomodule')->__('Content'),
    'title'     => Mage::helper('demomodule')->__('Content'),
    'style'     => 'height:15em',
    'config'    => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
    'wysiwyg'   => true,
    'required'  => false,
));

posted on 2014-06-03 18:30  冯亮  阅读(292)  评论(0编辑  收藏  举报

导航