0

when editing product there is wysiwyg button like this wysiwyg editor button

this button will popup wysiwyg editor when you click it and the value goes to the field text with html tag, i've tried the solution in here, but it didnt work at all

is there a way to add it to one of my fieldset that goes like this

$fieldset->addField(
            'custom_field',
            'text',
            array(
                'name'   => 'custom_field0',
                'container_id' => 'attribute-custom0',
                'placeholder' => $this->__('Custom Attribute Field'),
        ));
  • try this - piyushsuthar.wordpress.com/2015/07/13/… – Piyush Jan 4 '17 at 7:29
  • @Idham Choudry : solved your problem from my answer? – H_Parekh Jan 4 '17 at 7:42
  • @Piyush Fatal error: Class 'Mage_Modulename_Helper_Data' not found in C:\xampp\htdocs\ourdreamparty\app\Mage.php on line 555 – Idham Choudry Jan 4 '17 at 7:43
  • @IdhamChoudry create a helper file in app/code/local/Namespace/Module/Helper/ directory – Piyush Jan 4 '17 at 7:47
  • @Piyush i already have helper data – Idham Choudry Jan 4 '17 at 8:08
2

Try Below Code:

$fieldset->addField(
            'custom_field',
            'editor',
            array(
                'name'   => 'custom_field0',
                'container_id' => 'attribute-custom0',
                'placeholder' => $this->__('Custom Attribute Field'),
                'config'    => Mage::getSingleton('cms/wysiwyg_config')->getConfig(),
                'wysiwyg'   => true,
        ));
  • @the field is showing wysiwyg editor but not the way i want, what i want is a button like image above to open wysiwyg editor in pop up mode – Idham Choudry Jan 4 '17 at 8:54
  • pop up mode? than I think you need put jqeury for that – H_Parekh Jan 4 '17 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.