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'),
 ));
asked Jan 4, 2017 at 7:23
7
  • try this - piyushsuthar.wordpress.com/2015/07/13/… 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 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,
 ));
answered Jan 4, 2017 at 7:34
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

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.