在mvc項目中爲我的textarea編輯器使用nicEditor時出現問題。NicEditor在mvc中無法正常工作
這裏是我有created.From的第一視圖2視圖頁面我傳遞路由值給第二視圖
<ul class="mar">
@foreach (var item in Model)
{
<li class="mar" style="list-style-type:none">
<div style="display:inline-block;font-size:small">
<a id="[email protected]" class="glyphicon glyphicon-triangle-right" style="text-decoration:none;cursor:pointer;color:dimgray" onclick="toggle(@item.thread.MessageID)"></a>
<h3 class="mar" style="display:inline-block;"><a href="@Url.Action("GetMessage", "Home", routeValues: new{id=thread.Title.MessageID})" style="text-decoration:none;cursor:pointer">@item.thread.Title</a></h3>
</div>
<li>
</ul>
第二個視圖
@Scripts.Render("~/bundles/jquery")
<script type="text/javascript" src="~/Scripts/nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<h2>GetMessage</h2>
<textarea style="width:900px"></textarea>
這裏第二視圖顯示niceditor( textarea)沒有它的圖像inEdild與nicEditor
當我從第一視圖中刪除傳遞參數,然後它工作正常..
我需要知道爲什麼會發生這樣的???
是的,圖像節點上有404錯誤。但不知道原因。我在.js文件中找到了上面的代碼。它就像var NicEditorconfig = { iconsPath:'../nicEditorIcons.gif', buttonList:['bold','italic','underline','ol','ul'] };我該如何解決問題? –
http://nicedit.com/demos.php?demo=2 – nevtag