hi guys, a short and simple question:How to configure CKEditor(widget) of yii2 to be disabled or readonly. Both attrbiutes aren’t implementen by widget. I tried like this but got Exception:
field($model, 'bodytext', ['showLabels' => true])->widget(CKEditor::className(), [ 'options' => ['rows' => 1], 'preset' => 'full', 'setReadOnly' => true, //this will throw out Exception 'disabled'=>true [size=2]//this will throw out Exception,too[/size] ]) ?>
Please refer the following link for read only mode. From your code, I think you need to change the name of config key to be -> [color=#F8F8F2]readOnly[/color]
I have used the following widget and seems working perfect for me.