Inheritance: extends skeeks\yii2\ckeditor\CKEditorWidget
Example #1
0
 /**
  * Registers CKEditor plugin
  */
 protected function registerPlugin()
 {
     $view = $this->getView();
     $this->ckeditor = new \skeeks\cms\widgets\formInputs\ckeditor\Ckeditor(ArrayHelper::merge(['model' => $this->model, 'attribute' => $this->attribute, 'relatedModel' => $this->model], $this->ckeditorOptions));
     $this->codemirror = new CodemirrorWidget(ArrayHelper::merge(['model' => $this->model, 'attribute' => $this->attribute, 'preset' => 'htmlmixed', 'assets' => [\skeeks\widget\codemirror\CodemirrorAsset::THEME_NIGHT], 'clientOptions' => ['theme' => 'night']], $this->codemirrorOptions));
     $this->ckeditor->registerAssets();
     $this->codemirror->registerAssets();
     $this->clientOptions['ckeditor'] = $this->ckeditor->clientOptions;
     $this->clientOptions['codemirror'] = $this->codemirror->clientOptions;
     ComboTextInputWidgetAsset::register($this->view);
 }
Example #2
0
echo $form->fieldSetEnd();
?>




<?php 
echo $form->fieldSet(\Yii::t('skeeks/cms', 'Description'));
?>

    <?php 
echo $form->field($model, 'description_full')->widget(\skeeks\cms\widgets\formInputs\ckeditor\Ckeditor::className(), ['options' => ['rows' => 20], 'preset' => 'full', 'relatedModel' => $model]);
?>

    <?php 
echo $form->field($model, 'description_short')->widget(\skeeks\cms\widgets\formInputs\ckeditor\Ckeditor::className(), ['options' => ['rows' => 6], 'preset' => 'full', 'relatedModel' => $model]);
?>

<?php 
echo $form->fieldSetEnd();
?>



<?php 
echo $form->fieldSet(\Yii::t('skeeks/cms', 'Additional Information'));
?>

    <?php 
echo $form->field($model, 'original_name')->textInput(['maxlength' => 255, 'disabled' => 'disabled'])->hint(\Yii::t('skeeks/cms', 'Filename at upload time to the site'));
?>