2amigos / yii2-ckeditor-widget

CKEditor WYSIWYG widget for Yii2.
https://2amigos.us/open-source/ckeditor-widget
Other
172 stars 111 forks source link

Class 'dosamigos\ckeditor\CKEditor' not found #131

Closed DarkSlash closed 5 years ago

DarkSlash commented 5 years ago

I install it using composer require 2amigos/yii2-ckeditor-widget but when I try to use it in a view, I get the error "Class 'dosamigos\ckeditor\CKEditor' not found". At the beginning of the file I wrote use dosamigos\ckeditor\CKEditor; and I see the files on the vendor/dosamigos folder.

bhushanlambat10 commented 5 years ago

I am facing same Issue ... Any solutionssss....?

DarkSlash commented 5 years ago

I found the solution! I installed the plugin by composer... in the backend folder. This must be installed on the root folder to work. I though I could just install it for backend, but doesn't work that way.

Aribros commented 5 years ago

Since you found the solution, I will closing this issue.

ntpthao commented 5 years ago

excuse me, how to install the plugin by composer in the backend folder??? Can you guide me specifically?

tonydspaniard commented 5 years ago

@ntpthao the plugin when used with composer, you simply need to insert it into the page you use by adding the namespace.

The composer.json file must be at the root of your project and then, insert the autoload on your index files. Yii already does that for you: https://github.com/yiisoft/yii2-app-advanced/blob/master/environments/dev/backend/web/index.php#L5