## 富文本编辑组件tinyMCE * https://github.com/2amigos/yii2-tinymce-widget * view文件中,使用如下 ~~~ <?php echo $form->field($model, 'sms_template')->widget(\dosamigos\tinymce\TinyMce::className(), [ 'options' => ['rows' => 6], 'language' => 'zh_CN', 'clientOptions' => [ 'relative_urls' => false, 'remove_script_host' => false, 'convert_urls' => true, 'file_browser_callback' => new yii\web\JsExpression("function(field_name, url, type, win) { window.open('".yii\helpers\Url::to(['/imagemanager/manager', 'view-mode'=>'iframe', 'select-type'=>'tinymce'])."&tag_name='+field_name,'','width=800,height=540 ,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no'); }"), 'plugins' => [ "advlist autolink lists link charmap print preview anchor", "searchreplace visualblocks code fullscreen", "insertdatetime media table contextmenu paste image" ], 'toolbar' => "undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image" ] ]); ?> ~~~