private function registerAssets()
 {
     $view = $this->getView();
     if (ArrayHelper::getValue($this->clientOptions, 'codemirror')) {
         CodemirrorAsset::register($view);
     }
     SummernoteAsset::register($view);
     if ($language = ArrayHelper::getValue($this->clientOptions, 'lang', null)) {
         SummernoteLanguageAsset::register($view)->language = $language;
     }
 }
 public function run()
 {
     $view = $this->getView();
     SummernoteAsset::register($view);
     if (ArrayHelper::getValue($this->clientOptions, 'lang', null)) {
         LanguageAsset::register($view)->language = $this->clientOptions['lang'];
     }
     echo $this->hasModel() ? Html::activeTextarea($this->model, $this->attribute, $this->options) : Html::textarea($this->name, $this->value, $this->options);
     $clientOptions = empty($this->clientOptions) ? null : Json::encode($this->clientOptions);
     $view->registerJs('jQuery( "#' . $this->options['id'] . '" ).summernote(' . $clientOptions . ');');
 }