markItUp - 一个轻量级的文本编辑器

一个基于jQuery的开源文本编辑器, 目标是让开发者能够将textarea元素扩展为一个简单的文本编辑器。现在支持html、Wiki、BBScode等编辑格式,并且相当的轻巧(5.5k),有比较好的扩展性,如果需求简单的话可以考虑一下。

 

工程地址:http://markitup.jaysalvat.com/home/

Ajaxian上的介绍:http://ajaxian.com/archives/markitup-lightweight-text-editor

 

When Jay Salvat set out to build markItUp!, he wasn't trying to build the next FCKEditor or TinyMCE. He just wanted to build a simple editor that could allow developers to add enhanced markup capability to textarea elements.

markItUp! is a JavaScript plugin built on the jQuery library. It allows you to turn any textarea into a markup editor. Html, Textile, Wiki Syntax, Markdown, BBcode or even your own Markup system can be easily implemented. markItUp! is not meant to be a “Full-Features-Out-of-the-Box”-editor. Instead it is a very lightweight, customizable and flexible engine made to meet the developer's needs in their CMSes, blogs, forums or websites. markItUp! is not a WYSIWYG editor, and it never will be.

The usage is very straightforward. The following code demonstrates the ease of using markItUp!:

PLAIN TEXT
CSS:
  1. <link rel= "stylesheet" type= "text/css" href= "markitup/skins/markitup/style.css" />
  2. <link rel= "stylesheet" type= "text/css" href= "markitup/sets/html/style.css" />
PLAIN TEXT
JAVASCRIPT:
  1. <script type= "text/javascript" src= "jquery.js"></script>
  2. <script type= "text/javascript" src= "markitup/jquery.markitup.js"></script>
  3. <script type= "text/javascript" src= "markitup/sets/html/set.js"></script>
  4. <script language= "javascript">
  5. $ (document ). ready ( function ( )    {
  6.     $ ( '#html' ). markItUp (myHtmlSettings );
  7. } );
  8. </script>
PLAIN TEXT
HTML:
  1. <textarea id="html" cols="80" rows="20">
  2.         ...html stuff...
  3. </textarea>

The code generates a very intuitive markup editor as demonstrated below:

The script also provides several different options for the editor which adjust the style of editing. You can see those on the examples page.

The main highlights of markItUp! include:

  • Fast and unobtrusive integration
  • Support for keyboard shortcuts
  • Toolbar and drop down menus
  • Fully customizable and scriptable
  • Editor's features callable from any place
  • Ajax dynamic preview
  • Customizable Skins
  • Tested on PC: IE6/7, Firefox 2, Opera 9+, Safari 3
  • Tested on OSX: Safari, Opera 9+ and Firefox 2
  • License: MIT/GPL
  • Packed naked engine is about 5.5 kb
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值