Reputation: 8012
I have developed a PyroCMS
custom module, but now I want to add WYSIWYG
editor instead of the text area.
How can I add it?
Upvotes: 0
Views: 1087
Reputation: 11
Update:
With PyroCMS 2.2, $this->data
has been deprecated.
In your controller you would need to change
->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE))
to
->append_metadata($this->load->view('fragments/wysiwyg', compact('items'), TRUE))
Upvotes: 1
Reputation: 8012
Just append this while building the template in the controller.
->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE))
and then
echo form_textarea(array('id' => 'body', 'name' => 'code', 'value' => '', 'rows' => 30, 'class' => 'wysiwyg-advanced'));
Hopefully this will help you sometime..
Upvotes: 3