http://xheditor.com/ XhEditor官网,可下载文件包
在VS中新建一个文件夹Editor,将下载的XhEditor的文件包拖到新建的文件夹Editor中。如下图所示:
应用时,在Html中添加如下引用代码:
<style type="text/css">
/*For News Or Artical Edit*/
.newscontent
{
780px;
height: 520px;
}
</style>
<script src="Editor/jquery/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="Editor/xheditor-1.1.10-en.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#txtNewsContent').xheditor({ skin: 'o2007blue', tools: 'mfull', urlType: 'rel',
upLinkUrl: "../xheditor/upload.aspx", upLinkExt: "zip,rar,txt",
upImgUrl: "../xheditor/upload.aspx", upImgExt: "jpg,jpeg,gif,png",
upFlashUrl: "../xheditor/upload.aspx", upFlashExt: "swf",
upMediaUrl: "../xheditor/upload.aspx", upMediaExt: "avi",
localUrlTest: /^https?:\/\/[^\/]*?(yxxx\.com)\//i, remoteImgSaveUrl: '../xheditor/saveremoteimg.aspx'
});
});
</script>
一种方法是普通TextBox,如下:
<asp:TextBox ID="txtNewsContent" runat="server" TextMode="MultiLine" CssClass="newscontent"></asp:TextBox>
其二是像Demo中,Textarea.
。。。
仅作总结记录,以备以后参考。