基于MVC3 Razor视图引擎的富文本运用

来源:互联网 发布:安卓编程类游戏 编辑:程序博客网 时间:2024/06/05 08:27

下载ueditor1_4_3-utf8-net,放到项目中


在view下的.cshtml页面中,引用:

<script type="text/javascript" src="@Url.Content("~/Interface/ueditor1_4_3-utf8-net/ueditor.config.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Interface/ueditor1_4_3-utf8-net/ueditor.all.min.js")"></script>
<script type="text/javascript" charset="utf-8" src="~/Interface/ueditor1_4_3-utf8-net/lang/zh-cn/zh-cn.js"></script>

在JS代码中定义var business = UE.getEditor('Business');


在页面中调用:@Html.TextAreaFor(m => Model.Business, new { @style = " width:100%; height:400px;" })


效果图如下:



0 0
原创粉丝点击