2016-01-14 16:57:27 3209次浏览 0条回答 0 悬赏 10 金钱
 <script>
    window.UEDITOR_HOME_URL = "/frontend/web/public/ueditor/";
</script>
    $this->registerJsFile('/frontend/web/public/ueditor/ueditor.config.js');
    $this->registerJsFile('/frontend/web/public/ueditor/ueditor.all.js');
    $this->registerJsFile('/frontend/web/public/ueditor/lang/zh-cn/zh-cn.js');


    $this->title = '发帖';
    $this->params['breadcrumbs'][] = $this->title;
?>
<div class="index-posts">

    <h1><?= Html::encode($this->title) ?></h1>

    <script>

            var ue = UE.getEditor('editor');

    </script>

    <style>
        .inline .radio,.inline .checkbox{display: inline-block;margin: 0 5px;}
        #editor{margin-top: 20px;padding:0;margin:20px 0;width:100%;height:auto;border: none;}

    </style>

    <div class="row">
        <div class="col-lg-5">
            <?php $form=ActiveForm::begin([
                'id'=>'upload',
                'enableAjaxValidation' => false,
                'options'=>['enctype'=>'multipart/form-data']
            ]);
            ?>

            <?= $form->field($model,'title')->textInput();?>

            <?= $form->field($model, 'image')->fileInput();?>

            <?= $form->field($model,'content')->textarea(['rows'=>6,'id'=>'editor','class'=>'col-sm-1 col-md-12']);?>

            <?=  Html::submitButton('提交', ['class'=>'btn btn-primary','name' =>'submit-button']) ?>

            <?php ActiveForm::end();?>

富文本编辑器并没有出来

    没有找到数据。
您需要登录后才可以回答。登录 | 立即注册
liluoao
CEO

liluoao 杭州

注册时间:2015-12-26
最后登录:2023-09-30
在线时长:20小时13分
  • 粉丝6
  • 金钱10510
  • 威望0
  • 积分10710

热门问题