Skip to content

Commit c5dc9ed

Browse files
committed
Merge branch 'master' of github.com:Nerian/bootstrap-wysihtml5-rails
2 parents 1a1cebf + 491697d commit c5dc9ed

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,29 @@ Or just add the ones that you want
6262
//= require bootstrap-wysihtml5/locales/es-ES
6363
```
6464

65+
Rails compiles and minify all stylesheets into a single file. We need `bootstrap-wysihtml5/wysiwyg-color.css` to be available as a single file.
66+
Modify `config/environments/production.rb` to contain:
67+
68+
```
69+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
70+
config.assets.precompile += %w( bootstrap-wysihtml5/wysiwyg-color.css )
71+
```
72+
6573
You may need to restart your rails server.
6674

6775
## Using bootstrap-wysihtml5-rails
6876

6977
Just call wysihtml5() with any selector.
7078

7179
```html
72-
<textarea id="some-textarea" placeholder="Enter text ..."></textarea>
80+
<textarea id="some-textarea" class='wysihtml5' placeholder="Enter text ..."></textarea>
7381

7482
<script type="text/javascript">
75-
$('#some-textarea').wysihtml5();
83+
$('.wysihtml5').each(function(i, elem) {
84+
$(elem).wysihtml5();
85+
});
7686
</script>
87+
7788
```
7889

7990
A live example: http://jsfiddle.net/5UUrg/

0 commit comments

Comments
 (0)