**This repo is no longer maintained. "bootstrap3-wysiwyg":https://github.com/bootstrap-wysiwyg/bootstrap3-wysiwyg is much better** h1. Overview Bootstrap-wysihtml5 is a javascript plugin that makes it easy to create simple, beautiful wysiwyg editors with the help of "wysihtml5":https://github.com/xing/wysihtml5 and "Twitter Bootstrap":http://twitter.github.com/bootstrap/. h1. Examples * "http://jhollingworth.github.com/bootstrap-wysihtml5":http://jhollingworth.github.com/bootstrap-wysihtml5/ h1. Quick Start If you are using rails use the "bootstrap-wysihtml5-rails gem":http://rubygems.org/gems/bootstrap-wysihtml5-rails.
gem install bootstrap-wysihtml5-railsOtherwise, download "the latest version of bootstrap-wysihtml5":https://github.com/jhollingworth/bootstrap-wysihtml5/downloads. h2. Files to reference
h2. Usage
You can get the html generated by getting the value of the text area, e.g.
$('#some-textarea').val();
h1. Advanced
h2. Options
An options object can be passed in to .wysihtml5() to configure the editor:
$('#some-textarea').wysihtml5({someOption: 23, ...})
h3. Buttons
To override which buttons to show, set the appropriate flags:
$('#some-textarea').wysihtml5({
"font-styles": true, //Font styling, e.g. h1, h2, etc. Default true
"emphasis": true, //Italics, bold, etc. Default true
"lists": true, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
"html": false, //Button which allows you to edit the generated HTML. Default false
"link": true, //Button to insert a link. Default true
"image": true, //Button to insert an image. Default true,
"color": false //Button to change color of font
});
h3. Custom Templates for Toolbar Buttons
To define custom templates for buttons, you can submit a customTemplates hash with the new definitions. Each entry should be a function which expects 'locale' and optional 'options' to manage the translations.
For example, the default template used for the editHtml mode button looks like this (with size fetched from the optional 'options')
var myCustomTemplates = {
html : function(locale) {
return "