Answer the question
In order to leave comments, you need to log in
How to add value parameter in CKeditor?
Good afternoon.
How to add value parameter in CKeditor?
Am I using CKeitor by MiahailDev?
Or are there similar similar text editors?
Answer the question
In order to leave comments, you need to log in
How to add value parameter in CKeditor?Can you be more specific about what value
Am I using CKeitor by MiahailDev?I don't know, you know better what you are using
Or are there similar similar text editors?I like imperavi:
I do so
<?= $form->field($model, 'short_text')->widget(CKEditor::className(),[
'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => 'articles_files'], ['preset' => 'full', 'height' => 250]),
]) ?>
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'short_text')->widget(CKEditor::className(),[
'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => 'articles_files'], ['preset' => 'full', 'height' => 250]),
]) ?>
<?//= $form->field($model, 'full_text')->textarea(['rows' => 6]) ?>
<?= $form->field($model, 'full_text')->widget(CKEditor::className(),[
'editorOptions' => ElFinder::ckeditorOptions(['elfinder', 'path' => 'articles_files'], ['preset' => 'full', 'height' => 250])
]) ?>
<?php ActiveForm::end(); ?>
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}
protected function findModel($id)
{
if (($model = Articles::findOne($id)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question