Category: C#/asp.net 2012-10-09 22:35 665 People read comments (0) favorite reports Text editing Asp.nettextboxserveraspsafari
Directory (?) [+]
Friends who have done web development believe that they have used Rich text editor, more famous cuteeditor and ckeditor Many people should have already used, in the powerful at the same time need to load things also become a lot. The two rich text editors that are recommended below are written using JS, simple and very lightweight.
Niceditor
Nicedit is a lightweight, cross-platform, inline Content Editor. Nicedit can make any element/div editable or able to convert standard textarea into a rich text editor.
Home:http://nicedit.com/
Download:http://nicedit.com/download.php
Example:http://nicedit.com/demos.php
Nicedit is the most lightweight rich text editor I've ever seen, with a total of one JS file and one picture
It is also very easy to use, simply add a simple JS code to the page to convert a TextBox or textarea control into a rich text editor, the code is as follows
<HeadRunat= "Server" > <Title>Title>Head><Body> <FormId= "Form1"Runat= "Server" > <ScriptSrc=".. /js/eidtor/nicedit.js "Type= "Text/javascript" >Script> <ScriptType= "Text/javascript" > bklib.ondomloaded (function () {New Niceditor ({fullpanel:True}). Panelinstance (' Txtcontent '); });Script> <asp:textbox =" Server "ID= "Txtcontent" textmode= "MultiLine" height= "200px" width= "600px" >asp: Textbox> form>body>html>
Run the following effect
The English version of the official website, and the font settings can only set the English font, I made a simple Chinese language, and added several Chinese fonts, such as
Kindeditor
Kindeditor is a set of open source HTML visual editor, mainly used for users to get WYSIWYG editing results on the site, compatible with IE, Firefox, Chrome, Safari, opera and other mainstream browsers. Kindeditor is written in JavaScript and can be seamlessly bonded to Java,. NET, PHP, ASP, and other programs. This is an introduction to the official website.
Home:http://www.kindsoft.net/index.php
Download:http://www.kindsoft.net/down.php
Example:http://www.kindsoft.net/demo.php
Kindeditor compared to niceditor involved in a lot more files, but the size is only hundreds of K, for the file structure
Using code
<Htmlxmlns= "Http://www.w3.org/1999/xhtml" ><HeadRunat= "Server" > <Title>Title>Head><Body> <FormId= "Form1"Runat= "Server" > <ScriptCharSet= "Utf-8"Src=".. /js/kindeditor/kindeditor-min.js " Type= "Text/javascript" >Script> <ScriptType= "Text/javascript"CharSet= "Utf-8" > ke.show ({ID:' Txtcontent ', Resizemode:1, allowpreviewemoticons:False, Allowupload:False,});Script> <textarea cols= "$" id= "txtcontent" style= "width: 600px; height: 300px;" runat= "Server" readonly= "ReadOnly" >textarea> form>body >html>
Run the following effect
Two text editor nicedit and Kindeditor in ASP.