HTML5 富文本编辑器:Squire
jopen
10年前
Squire是一个HTML5的富文本编辑器,它提供了强大的跨浏览器的标准化,同时又是超级轻巧灵活。 只支持最新的浏览器。
Installation
- Download the source from neilj/Squire
- Copy the contents of thebuild/directory onto your server.
- 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).
- In your application, instead of a<textarea>, use an<iframe src="path/to/document.html">.
- 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.
- Use the API below with theeditorobject to set and get data and integrate with your application or framework.