Search code examples
wysiwygpyrocms

PyroCMS - Add WYSIWYG editor in frontend


i need to show a simple editor in the frontend of my website. I tried to append the wysiwyg editor in my Public_Controller in this way:

function ask(){
    $this->template
                ->title('ask your question')
                ->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE))
                ->build('user/ask');
}

but when i tri to see my frontend page i get this error:

An Error Was Encountered
Unable to locate the file: fragments/wysiwyg.php

How can i fix it?


Solution

  • I solved in this way. In the controller $this->template->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE)); while in the view just use wysiwyg-advanced