HTML5 富文本编辑器:Squire

jopen 9年前

Squire是一个HTML5的富文本编辑器,它提供了强大的跨浏览器的标准化,同时又是超级轻巧灵活。 只支持最新的浏览器。

Installation

  1. Download the source from neilj/Squire
  2. Copy the contents of thebuild/directory onto your server.
  3. Edit the<style>block in document.html to add the default styles you would like the editor to use (or link to an external stylesheet).
  4. In your application, instead of a<textarea>, use an<iframe src="path/to/document.html">.
  5. In your JS, attach an event listener to theloadevent of the iframe. When this fires you can grab a reference to the editor object throughiframe.contentWindow.editor.
  6. Use the API below with theeditorobject to set and get data and integrate with your application or framework.

项目主页:http://www.open-open.com/lib/view/home/1421394578484