Magento Forum

   
How to add richtext/tinymce/wysiwyg field to a Magento widget
 
marcelv91
Jr. Member
 
Total Posts:  29
Joined:  2013-03-01
 

Hi everybody, since i`m getting no replies anywhere else, my final try is to post my question in this forum. Hope you developers can help me out.

My problem:
I created a few small widgets for magento. Everything fine, but I can`t seem to figure out how to add a richtext (tinymce wysiwyg) field to my widget.

Only thing I find on this is: “use ‘wysiwyg’ => true” in “$fieldset->addField”. But I cannot use this in my custom widget, can I?

I understand that I can use addField to add a field to for example a product or CMS page.

But the only way of adding fields in my custom widget, as far as I know, is by adding parameters in my widget.xml. Other widget I build by following some tutorial returns a button, by using a custom type as parameter:

$removeButton = $this->getLayout()->createBlock(’adminhtml/widget_button’)
->setType(’button’)
->setClass(’delete’)
->setLabel($this->__(’Remove Image’))
->setOnclick(’document.getElementById(\’’.$element->getId().’\’).value=\’\’;if(document.getElementById(\’’.$element->getId().’_image\’))document.getElementById(\’’.$element->getId().’_image\’).parentNode.remove()’)
->setDisabled($element->getReadonly())
->setStyle(’margin-left:10px;margin-top:7px’);

But i just can`t figure out how to add a richtext field in either my Widget.xml or my phpfile for the custom type.

What am I missing? Hope someone can help me out.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top