Автор: Antonio Ramirez (amigo.cobos@gmail.com)
Наследование: extends yii\web\AssetBundle
Пример #1
0
 /**
  * 
  * Method register editor on change
  * 
  */
 protected function registerOnChange()
 {
     $ckeditor = \dosamigos\ckeditor\CKEditorAsset::register($this->view);
     $plugin = __DIR__ . '/plugins';
     $this->recurse_copy($plugin, $ckeditor->basePath . '/plugins');
     $browseOptions = ['config.extraPlugins' => 'onchange'];
     $this->clientOptions = ArrayHelper::merge($browseOptions, $this->clientOptions);
 }
Пример #2
0
 /**
  * Registers CKEditor plugin
  */
 protected function registerPlugin()
 {
     $view = $this->getView();
     CKEditorAsset::register($view);
     $id = $this->options['id'];
     $options = $this->clientOptions !== false && !empty($this->clientOptions) ? Json::encode($this->clientOptions) : '{}';
     $js = "CKEDITOR.replace('{$id}', {$options});";
     $view->registerJs($js);
 }
Пример #3
0
 /**
  * Registers CKEditor plugin
  */
 protected function registerPlugin()
 {
     $view = $this->getView();
     CKEditorAsset::register($view);
     $id = $this->options['id'];
     $options = $this->clientOptions !== false && !empty($this->clientOptions) ? Json::encode($this->clientOptions) : '{}';
     $js = [];
     if ($this->disableAutoInline) {
         $js[] = "CKEDITOR.disableAutoInline = true;";
     }
     $js[] = "CKEDITOR.inline('{$id}', {$options});";
     $view->registerJs(implode("\n", $js));
 }
 /**
  * Registers CKEditor plugin
  */
 protected function registerPlugin()
 {
     $view = $this->getView();
     CKEditorAsset::register($view);
     $id = $this->options['id'];
     $options = $this->clientOptions !== false && !empty($this->clientOptions) ? Json::encode($this->clientOptions) : '{}';
     $js = [];
     if ($this->disableAutoInline) {
         $js[] = "CKEDITOR.disableAutoInline = true;";
     }
     $js[] = "CKEDITOR.inline('{$id}', {$options});";
     if (isset($this->clientOptions['filebrowserUploadUrl'])) {
         $js[] = "dosamigos.ckEditorWidget.registerCsrfImageUploadHandler();";
     }
     $view->registerJs(implode("\n", $js));
 }