File tree 1 file changed +13
-2
lines changed 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -62,18 +62,29 @@ Or just add the ones that you want
62
62
//= require bootstrap-wysihtml5 /locales/es-ES
63
63
```
64
64
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
+
65
73
You may need to restart your rails server.
66
74
67
75
## Using bootstrap-wysihtml5-rails
68
76
69
77
Just call wysihtml5() with any selector.
70
78
71
79
``` html
72
- <textarea id="some-textarea " placeholder="Enter text ..." > </textarea >
80
+ <textarea id =" some-textarea" class = ' wysihtml5 ' placeholder =" Enter text ..." ></textarea >
73
81
74
82
<script type =" text/javascript" >
75
- $('#some-textarea' ).wysihtml5( );
83
+ $ (' .wysihtml5' ).each (function (i , elem ) {
84
+ $ (elem).wysihtml5 ();
85
+ });
76
86
</script >
87
+
77
88
```
78
89
79
90
A live example: http://jsfiddle.net/5UUrg/
You can’t perform that action at this time.
0 commit comments