Kindeditor editor control encapsulated by dotnet

Source: Internet
Author: User

KindEditor is very good. I liked it very much recently. KindEditor has extensions such as ForPHP, but not ForNet.
I am engaged in. net development. I used it to encapsulate a control and drag it to use it, which is simpler to use. The source code is provided to you. If you are interested, you can further improve it.

1. For the first use, you need to configure web. config.
Copy codeThe Code is as follows:
<Section name = "KindEditor" type = "KindEditorForDotNet. ConfigHandler, KindEditorForDotNet"/>
<! -- Editing path -->
<Item key = "BasePath" value = "~ /KindEditor "/>
<! -- Upload file path -->
<Item key = "UploadPath" value = "~ /Upload "/>
<! -- Topic type -->
<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'"/>

2. reference the DLL file, including KindEditorForDotNet and LitJSON. dll;

3. Sometimes, drag the control to webform. If the control does not appear in the control column, you can directly reference it.

Copy codeThe Code is as follows:
<% @ Page Language = "C #" AutoEventWireup = "true" CodeBehind = "Default. aspx. cs" Inherits = "EditorDemo. _ Default" %>
<% @ Register Assembly = "KindEditorForDotNet" Namespace = "KindEditorForDotNet" TagPrefix = "PC3" %>
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "">
<Html xmlns = "">
<Head runat = "server">
<Title> No title page </title>
<Form id = "form1" runat = "server">
Description: The control is inherited from TextBox. You can set Width, Height, and Enabled (read-only or not). Default style <br/>
<C0: editor id = "Editor1" runat = "server" Height = "100px" Width = "100%"> </PC3: editor> <br/>
Custom style (style is configured in web. config) <br/>
<C0: Editor ID = "Editor2" runat = "server" ThemeType = "simple" Height = "100px"> </C0: Editor> </div>
Display words (input: <span class = "count"> </span>)
<C0: Editor ID = "Editor3" runat = "server" ThemeType = "book" afterChange = "function({%k('.count'{.html (this. count ('text')} "Height =" 60px "Width =" 300px "> </PC3: Editor>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.