欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

dotnet封裝的kindeditor編輯器控件

 更新時(shí)間:2014年01月21日 10:16:42   作者:  
KindEditor很不錯(cuò),沒(méi)有ForNet的擴(kuò)展,我是搞.net開(kāi)發(fā)的,就用它簡(jiǎn)單封裝了一個(gè)控件,拖過(guò)來(lái)即可使用,使用更加簡(jiǎn)單

KindEditor很不錯(cuò),剛接觸不久,非常喜歡。KindEditor網(wǎng)站有ForPHP等擴(kuò)展的,沒(méi)有ForNet的。
我是搞.net開(kāi)發(fā)的,就用它簡(jiǎn)單封裝了一個(gè)控件,拖過(guò)來(lái)即可使用,使用更加簡(jiǎn)單。源碼提供給大家,有興趣的朋友可以進(jìn)一步完善。

1、第一次使用,需要配置一下web.config。

復(fù)制代碼 代碼如下:

<configSections>
<section name="KindEditor" type="KindEditorForDotNet.ConfigHandler,KindEditorForDotNet"/>
</configSections>
<KindEditor>
<!--編輯的所在路徑-->
<item key="BasePath" value="~/KindEditor"/>
<!--上傳文件的路徑-->
<item key="UploadPath" value="~/Upload"/>
<!--主題類(lèi)型-->
<item key="Theme:simple" value="'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
'insertunorderedlist', '|', 'emoticons', 'image', 'link'"/>
<item key="Theme:book" value="'forecolor', 'hilitecolor', 'bold', 'italic', 'underline','removeformat'"/>
</KindEditor>

2、然后引用DLL文件,包括KindEditorForDotNet、LitJSON.dll;

3、使有的時(shí)候,直接把控件拖到webform中即可,如果控件沒(méi)有出現(xiàn)在控件欄目,直接引用也可以

復(fù)制代碼 代碼如下:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="EditorDemo._Default" %>
<%@ Register Assembly="KindEditorForDotNet" Namespace="KindEditorForDotNet" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>無(wú)標(biāo)題頁(yè)</title>
</head>
<body>
<form id="form1" runat="server">
<div>
說(shuō)明:該控件繼承自TextBox; 可以設(shè)置Width、Height、Enabled(是否只讀)<hr />
默認(rèn)風(fēng)格<br />
<cc1:editor id="Editor1" runat="server" Height="100px" Width="100%"></cc1:editor><br />
自定義風(fēng)格(風(fēng)格來(lái)自于web.config中配置)<br />
<cc1:Editor ID="Editor2" runat="server" ThemeType="simple" Height="100px"></cc1:Editor></div>
顯示字?jǐn)?shù) (已經(jīng)輸入:<span class="count"></span>)
<br />
<cc1:Editor ID="Editor3" runat="server" ThemeType="book" afterChange="function(){K('.count').html(this.count('text'))}" Height="60px" Width="300px"></cc1:Editor>
<hr />
</form>
</body>
</html>

相關(guān)文章

最新評(píng)論