About

This tiny (5KB, < 200 lines) jQuery Bootstrap plugin turns any DIV into a WYSIWYG rich-content editor, inspired by CLEditor and bootstrap-wysihtml5. Here are the key features:

Automatically binds standard hotkeys for common operations on Mac and Windows

Drag and drop files to insert images, support image upload (also taking photos on mobile devices)

Voice dictation input (only in Chrome)

Allows a custom built toolbar, no magic markup generators, enabling the web site to use all the goodness of Bootstrap, Font Awesome and so on...

Does not force any styling - it's all up to you

Uses standard browser features, no magic non-standard code, toolbar and keyboard configurable to execute any supported browser command

Does not create a separate frame, backup text areas etc - instead keeps it simple and runs everything inline in a DIV

(Optionally) cleans up trailing whitespace and empty divs and spans

Requires a modern browser (tested in Chrome 26, Firefox 19, Safari 6, reported by users to work in IE10)

Supports mobile devices (tested on IOS 6 Ipad/Iphone and Android 4.1.1 Chrome)

Why?

While building a content editor for MindMup we found plenty of good HTML5 WYSWYG editors online, but most were duplicating functionality that already exists in jQuery and Bootstrap, implementing things that were meanwhile added to HTML5 and supported in major browsers, or doing too much magic such as inserting IFrames with backup text-areas. Most of this was to work around quirks in older browsers (which we didn't need) and caused focus problems on touch devices (which was an issue for us). Too much magic caused problems with bootstrap modals (a must for us). Most editors also build their own toolbars, which embed additional CSS and images and always turn out to be much worse than standard Bootstrap buttons.

It turns out, with HTML5, everything we need can fit into less than 5K. We built this tiny tiny editor that does everything we need, does not impose any particular additional CSS and uses modern browser functionality without reimplementing jQuery and Bootstrap.

It's released under the MIT license, so fork and enjoy!