在線編輯器XhEditorhttp://xheditor.com/ XhEditor官網(wǎng),可下載文件包
在VS中新建一個(gè)文件夾Editor,將下載的XhEditor的文件包拖到新建的文件夾Editor中。如下圖所示:
應(yīng)用時(shí),在Html中添加如下引用代碼:
<style type="text/css"> /*For News Or Artical Edit*/
.newscontent
{
width: 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.
。。。
僅作總結(jié)記錄,以備以后參考。