一個小巧的HTML編輯器_CLEditor_源碼下載


官網:
  
關於CLEditor:
   CLEditor是一個開源的jQuery插件提供了一個輕量級的、全功能、跨瀏覽器、可擴展、
  WYSIWYG HTML編輯器,可以很容易地添加到任何網站。
輕量級插件:
  CLEditor消耗小於9 k的總帶寬.包括的文件如下:
      
特性:
  除了標准的文本格式化特性發現在其他的所見即所得編輯器,CLEditor也含有豐富的下降對
  字體名稱、大小起伏、風格、文本顏色和突出顏色。CLEditor允許您插入圖片,超鏈接和水平的規則。
跨瀏覽器:
  CLEditor支持以下瀏覽器都在pc和mac:IE 6.0 + 1.5 +,Safari 4 FF +、Chrome和Opera 10 + 5 +。
  所有的測試都是使用jQuery 1.4.2。
 
=============================================================
說了這么多,現在就上一個例子:
1.項目結構
2.效果:
3./CLEditor/WebContent/index.jsp
 1 <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
 2 <%
 3 String path = request.getContextPath();
 4 String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 5 %>
 6 
 7 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 8 <html>
 9 <head>
10     <link rel="stylesheet" type="text/css" href="CLEditor1_3_0/jquery.cleditor.css" />
11     <script type="text/javascript" src="CLEditor1_3_0/jquery.min.js"></script>
12     <script type="text/javascript" src="CLEditor1_3_0/jquery.cleditor.min.js"></script>
13     <script type="text/javascript">
14       $(document).ready(function() {
15         $("#input").cleditor();
16         $("#sub").click(function(){
17             var input = $("#input").val();
18             $("#show_mess").html(input);
19         });
20       });
21     </script>
22 </head>
23   
24   <body>
25     About CLEditor<br>
26     <a href="http://premiumsoftware.net/cleditor/">CLEditor</a> is an open source jQuery plugin which provides a lightweight<br>
27     full featured, cross browser, extensible, WYSIWYG HTML editor that can be easily added into any web site.<br>
28     <textarea id="input" name="input"></textarea><br>
29     <button id="sub">submit</button>
30     <hr>
31     <div id="show_mess"></div>
32   </body>
33 </html>

源碼下載http://files.cnblogs.com/hongten/CLEditor.rar


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM