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'),
        ));
7
  • try this - piyushsuthar.wordpress.com/2015/07/13/…
    – Piyush
    Commented Jan 4, 2017 at 7:29
  • @Idham Choudry : solved your problem from my answer? Commented Jan 4, 2017 at 7:42
  • @Piyush Fatal error: Class 'Mage_Modulename_Helper_Data' not found in C:\xampp\htdocs\ourdreamparty\app\Mage.php on line 555 Commented Jan 4, 2017 at 7:43
  • @IdhamChoudry create a helper file in app/code/local/Namespace/Module/Helper/ directory
    – Piyush
    Commented Jan 4, 2017 at 7:47
  • @Piyush i already have helper data Commented Jan 4, 2017 at 8:08

1 Answer 1

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,
        ));
2
  • @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 Commented Jan 4, 2017 at 8:54
  • pop up mode? than I think you need put jqeury for that Commented Jan 4, 2017 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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