惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
WordPress大学
WordPress大学
小众软件
小众软件
The Register - Security
The Register - Security
量子位
博客园_首页
T
The Blog of Author Tim Ferriss
T
Threat Research - Cisco Blogs
G
Google Developers Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News and Events Feed by Topic
S
Security Affairs
O
OpenAI News
Google DeepMind News
Google DeepMind News
Webroot Blog
Webroot Blog
The Cloudflare Blog
雷峰网
雷峰网
酷 壳 – CoolShell
酷 壳 – CoolShell
IT之家
IT之家
Recent Commits to openclaw:main
Recent Commits to openclaw:main
V2EX - 技术
V2EX - 技术
S
Secure Thoughts
D
Docker
Cloudbric
Cloudbric
Vercel News
Vercel News
MongoDB | Blog
MongoDB | Blog
T
Troy Hunt's Blog
Blog — PlanetScale
Blog — PlanetScale
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News and Events Feed by Topic
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
Schneier on Security
Schneier on Security
Jina AI
Jina AI
Stack Overflow Blog
Stack Overflow Blog
T
Threatpost
D
DataBreaches.Net
Spread Privacy
Spread Privacy
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Security Archives - TechRepublic
Security Archives - TechRepublic
T
Tor Project blog
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
V
Vulnerabilities – Threatpost
B
Blog RSS Feed
C
Cisco Blogs
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
F
Fortinet All Blogs
The Hacker News
The Hacker News
Know Your Adversary
Know Your Adversary

博客园 - songsoft

Js表单验证控件-02 Ajax验证 Js表单验证控件(使用方便,无需编码)-01使用说明 字符串对比 模板引擎开发(三)-自定义标签的处理 Flash AS实现时钟效果(全脚本实现) 模板引擎开发(二)-值标签的处理 Jquery插件-浮动广告 模板引擎开发(一) 软件开发模型之一 万祖归宗是瀑布 关于制度化管理 关于加薪的策略 关于文档编写 蓝海与红海--有感于软件创新 李广难封--有感于团队建设 哪里是乐土?--关于团队良性循环 从酒桌上看团队建设 创造一切条件让大家“混” 百万富翁成长路线 绿有四季--关于需求沟通
KindEditor编辑器For DotNet控件
songsoft · 2014-01-20 · via 博客园 - songsoft

KindEditor很不错,刚接触不久,非常喜欢。KindEditor网站有ForPHP等扩展的,没有ForNet的。

我是搞.net开发的,就用它简单封装了一个控件,拖过来即可使用,使用更加简单。源码提供给大家,有兴趣的朋友可以进一步完善。

源码下载  http://yunpan.cn/cAqMgHW98ymFN  访问密码 bd42

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

  <configSections>
    <section name="KindEditor" type="KindEditorForDotNet.ConfigHandler,KindEditorForDotNet"/>
  </configSections>
  <KindEditor>
    <!--编辑的所在路径-->
    <item key="BasePath" value="~/KindEditor"/>
    <!--上传文件的路径-->
    <item key="UploadPath" value="~/Upload"/>    
    <!--主题类型-->
    <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、使有的时候,直接把控件拖到webform中即可,如果控件没有出现在控件栏目,直接引用也可以

<%@ 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>无标题页</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        说明:该控件继承自TextBox; 可以设置Width、Height、Enabled(是否只读)<hr />
        默认风格<br />
        <cc1:editor id="Editor1" runat="server" Height="100px" Width="100%"></cc1:editor><br />
        自定义风格(风格来自于web.config中配置)<br />
        <cc1:Editor ID="Editor2" runat="server" ThemeType="simple" Height="100px"></cc1:Editor></div>
        显示字数 (已经输入:<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 />
        10522779@qq.com
        
    </form>
</body>
</html>