Search code examples
pyrocms

How to add wysiwyg editor in "HTML" pyrocms widget


I would say if it's possible to add wysiwyg editor (CKeditor) in "HTML" pyrocms widget. I'm trying in this way, but it doesn't work:

1) In "system/cms/modules/widgets/controllers/admin.php", I've changed __constructor method:

    $this->template
      ->set_partial('shortcuts', 'admin/partials/shortcuts')
      ->append_metadata(js('widgets.js', 'widgets'))
      ->append_metadata(css('widgets.css', 'widgets'));

to this

    $this->template
      ->set_partial('shortcuts', 'admin/partials/shortcuts')
      ->append_metadata(js('widgets.js', 'widgets'))
      ->append_metadata(css('widgets.css', 'widgets'))
      ->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE));

2) In "system/cms/widgets/html/views/form.php", I've changed

<?php echo form_textarea(array('name'=>'html', 'value' => $options['html'])); ?>

to this

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

Do you have any suggestion?


Solution

  • I found a solution: you can read it here http://pyrocms.com/forums/topics/view/2552