1

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?

Dan Short
  • 9,598
  • 2
  • 28
  • 53
freesurf
  • 31
  • 4

1 Answers1

2

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

freesurf
  • 31
  • 4
  • hello. maybe you got more info on this? I have added to widget constructor: $this->template->append_metadata($this->load->view('fragments/wysiwyg', array(), true)); I see the JS loaded in header, but how now to bind the ckeditor, when we load the ckeditor? class is OK, somehow need to trigger the ckeditor init on EDIT – huglester Sep 08 '14 at 14:11