I have installed CKEditor Yii framework 2.0 extension with the following command.
php composer.phar require "2amigos/yii2-ckeditor-widget" "*"
I use it in my form with the following code.
use dosamigos\ckeditor\CKEditor;
$form->field($myModel, 'text')->widget(CKEditor::className(), [
'options' => ['rows' => 6],
'preset' => 'basic'
]);
Further more, I have a dropdownlist in my form. Let's assume as follows.
<select id="select-number" class="form-control" name="MyModel[select-number]">
<option value="">-- Select a number --</option>
<option value="1">Number 1</option>
</select>
When one selects an option, I want to insert some default data into the CKEditor textarea. How can I select the CKEditor textarea and insert data into it?