本文介绍了与DropDownList的错误时的CKEditor也在页面上使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有工作就好了一个DropDownList,但是当我有添加 CKEditor的(CKEditor的标准4.5.7),以韩德尔 EditorFor 帮助我得到这个错误:

Removing the CkEditor solve this error but I do need it, relevant code (from view)

    <div class="form-group">
        @Html.LabelFor(model => model.rev.ReviewBody, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.rev.ReviewBody, new { htmlAttributes = new { @class = "form-control", @id = "RevBEditor" } })
            @Html.ValidationMessageFor(model => model.rev.ReviewBody, "", new { @class = "text-danger" })
        </div>
    </div>  <div class="form-group">
            @Html.LabelFor(model => model.sub.Occupation.OccupationDecription, "Occupation", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("OccupationId", null, htmlAttributes: new { @class = "" })
                @Html.ValidationMessageFor(model => model.OccupationId, "", new { @class = "text-danger" })
            </div>
        </div><script src="~/Scripts/ckeditor/ckeditor.js"></script> 
     <script type="text/javascript"> CKEDITOR.replace('RevBEditor'); </script>
解决方案

That's not because of CKEditor, that is happening because you did not give a data source to drop down

这篇关于与DropDownList的错误时的CKEditor也在页面上使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 07:12