Yii2 Class 'SummerNote' Not Found

Hi, I am creating a Faq modules and I want to insert SummerNote package so that the form can look nicer

But error ‘SummerNote’ class not found came out

Below i have attatched my summernote directory package folder structure

I have check my composer.json and

"marqu3s/yii2-summernote": "dev-master" is already in there

I also check in vendor/yiisoft/extensions and

‘marqu3s/yii2-summernote’ =>

array (

'name' => 'marqu3s/yii2-summernote',

'version' => '9999999-dev',

'alias' => 

array (

  '@marqu3s/summernote' => $vendorDir . '/marqu3s/yii2-summernote',



is already in there

below I attached my Faq controller and view page and the error that came out, I have tried many solution but nothing comes out, error Summernote class not found .

The proper namespace is marqu3s\summernote\Summernote

What editor are you using, is it Sublime? Maybe there is a way there to get namespaces hints like in any proper IDE.

Yes, I am using Sublime Text 3

I remove the below code from DefaultController and transfer it into form.php


use marqu3s\summernote\Summernote;

use marqu3s\summernote\SummernoteAsset;

use marqu3s\summernote\SummernoteLanguageAsset;


but other error come out, it says

Getting unknown property: backend\modules\faq\model\Faq::content

Any idea?, I think it is because of this line of code


<?= $form->field($model, ‘content’)->widget(Summernote::className(), [

'clientOptions' =&gt; [



]) ?>


SummernoteAsset and SummernoteLanguageAsset are asset classes that are registered by this widget so you don’t have to add use with them. As for the error you get it’s probably because you are using this widget on attribute ‘content’ that is not present in Faq model. Looks like you need some reading first, here are my recommendations:

  • PHP namespaces

  • Active Record

  • Creating Forms

  • Widgets

  • Assets