我从
Here使用Yii2 Redactor.我想删除图像和文件上传.
查看代码:
<?= $form->field($model,'reason')->widget( \yii\redactor\widgets\Redactor::className(),[]) ?>
截图
如果要隐藏Redactor的所有实例的按钮,可以将其添加到模块配置中
'modules' => [ 'redactor' => [ 'class' => 'yii\redactor\RedactorModule','widgetClientOptions' => [ 'buttonsHide' => ['image','file'],] ],],
否则,您可以将其添加到单个呼叫中
<?= $form->field($model,'reason')->widget(\yii\redactor\widgets\Redactor::className(),[ 'clientOptions' => [ 'buttonsHide' => ['image',] ])?>