I have been working on a site that uses PyroCMS. I needed to build a custom widget that had a WYSIWYG textarea. This is what worked for me.

Add this to template in the constructors function.


// my new template
->set_partial('shortcuts', 'admin/partials/shortcuts')
->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE));

The following javascript needs to be added to the top of your view/form.php file.


// my self special jquery
    // this is the config for the simple wysiwyg
    toolbar: [
        ['Bold', 'Italic', '-', 'NumberedList', 'BulletedList', '-', 'Link', 'Unlink']
    width: '99%',
    height: 100,
    dialog_backgroundCoverColor: '#000',
    defaultLanguage: '',
    language: ''

Also, you need to have the wysiwyg-simple class on your textarea.


echo form_textarea(array('name'=> 'html', 'value' => $options['html'], 'class' => 'wysiwyg-simple'));