1

I have installed CKEditor widget from yii2-ckeditor-widget using composer. Install was successful, there was no error.

Here is my view file:

use dosamigos\ckeditor\CKEditor;

.....

<?php echo $form->field($model, 'content')->widget(CKEditor::className(), [
    'options' => ['rows' => 6],
    'preset' => 'basic'
]) ?>

when I see in browser, there is nothing in the place of CKEditor in the form. I checked console message in firebug I found this.

enter image description here

while without CKEditor it is working fine

<?php echo $form->field($model, 'content')->textarea(['rows'=>6]) ?>

Am I missing something?

EDIT: I posted this as an issue on github and here is what I got:

It seems that your issue is related to the assets registration.

I do not know what is the issue with asset registration? Any suggestion?

radiovisual
  • 6,298
  • 1
  • 26
  • 41
ankitr
  • 5,992
  • 7
  • 47
  • 66

2 Answers2

2

There was problem with asset registration. I Kdiff current asset directory with another projects asset directory. And there was files missing I copied them in current project and now its running fine.

ankitr
  • 5,992
  • 7
  • 47
  • 66
  • 1
    Yes this is right. Just look in the base \ckeditor directory and make sure the files from here are in your script directory – pat capozzi Sep 18 '15 at 17:56
  • In my case I emptied both my "frontend\web\assets" and "backend\web\assets", and then it worked fine again, could be a caching problem too – jyonkheel Mar 29 '17 at 01:24
0

I was struggling with the same problem, I managed to solve this by making a hard copy of the assets in the web folder.

$ php app/console assets:install

For more info check: Symfony 2.6: Smarter assets:install command

Jeroen
  • 1,168
  • 1
  • 12
  • 24