我正在尝试将 CKEditor 集成到 MVC 应用程序中。据我所知,我真正要做的就是。
将以下内容添加到我的母版页。
<script type="text/javascript" src="../../ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="../../ckeditor/adapters/jquery.js"></script>
<script type="text/jscript" src="../../Scripts/jquery-1.3.2.js"></script>
然后在我看来。我有以下代码:
<script type="text/javascript">
$(document).ready(function() { $('#news').ckeditor(); });
</script>
<fieldset>
<legend>Fields</legend>
<p>
<label for="title">Title:</label>
<%=Html.TextBox("title")%>
<%= Html.ValidationMessage("title", "*") %>
</p>
<p>
<label for="news">News:</label>
<%=Html.TextArea("news")%>
<%= Html.ValidationMessage("news", "*") %>
</p>
<p>
<label for="publishedDate">Publication Date:</label>
<%= Html.TextBox("publishedDate") %>
<%= Html.ValidationMessage("publishedDate", "*") %>
</p>
<p>
<input type="submit" value="Create" />
</p>
</fieldset>
请记住,我并不是想让它真正做任何明智的回发。只是为了首先实际渲染。有人能准确指出我做错了什么吗?
哦,如果它有助于任何 VS 也会给我以下警告:
警告 1 更新 JScript IntelliSense 时出错:..剪切以保护无辜..\ckeditor\ckeditor.js:'getFirst()' 为空或不是对象@ 15:180 ..剪切以保护无辜..\Views\ Shared\Admin.Master 1 1 ilaTraining