In your /edit
->addField(
'item_name',
'text', array(
in your little array of data variables, just add 'wysiwyg' => true
Thats it! no adding calls to the framework, no constructors needed or other extended classes, just 1 variable.
to be clear, here is a fully flushed out field.
$fieldset->addField(
'menu',
'editor',
['name' => 'menu',
'label' => __('Menu HTML'),
'title' => __('Menu HTML'),
'required' => true,
'wysiwyg' => true]
);
So much simpler then people lead you on to believe. Figured it out by reading the source code instead of all the bloggers and tutorials. Go figure -.-
No comments:
Post a Comment