bootstrap-wysihtml5-rails 0.3.3.7 → 0.3.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of bootstrap-wysihtml5-rails might be problematic. Click here for more details.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b49729214f4bb7a06fb30ea94db63b6bd0111f5
|
4
|
+
data.tar.gz: 60b2e02391b84cd16ec35e27743570a440411f35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2937ec2234f270db5baa11cce12970a7e4b2d32b1195d4871853d3b51328f8c638aff6ba9a57f4e405859a84447f8a82f489c4827ff663aaeab3f9b34c59f0e3
|
7
|
+
data.tar.gz: cf9d85ee94acddc28344422d3c8957b7bfeec6afa191b3f7c3eb1158f52925fc2ded1691700d837d46a59cd4f39e5368cb2a06822d0d1be65d8f8f193d014319
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
[Bootstrap](http://getbootstrap.com) is a toolkit from Twitter designed to kickstart development of webapps and sites. It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
|
8
8
|
|
9
|
-
http://
|
9
|
+
http://getbootstrap.com/
|
10
10
|
|
11
11
|
Bootstrap Wysihtml5 is a plugin for Bootstrap designed by James Hollingworth. It provides a stylish wysiwyg editor for Bootstrap. We use Christian Sterzl's fork.
|
12
12
|
|
@@ -16,6 +16,8 @@ bootstrap-wysihtml5-rails project integrates it with Rails 3 assets pipeline.
|
|
16
16
|
|
17
17
|
https://github.com/Nerian/bootstrap-wysihtml5-rails
|
18
18
|
|
19
|
+
__This repo is only for packaging bootstrap-wysihtml5 into a ruby gem. If yor Pull Request is about changing bootstrap-wysihtml5 (any file in the 'vendor' folder) please create it in their repository, not here.__
|
20
|
+
|
19
21
|
__Latest version with Bootstrap 2 support was `0.3.1.24`. New releases only package Bootstrap 3 support.__
|
20
22
|
|
21
23
|
## Rails > 3.1
|
@@ -43,6 +45,11 @@ app/assets/stylesheets/application.css
|
|
43
45
|
*= require bootstrap-wysihtml5
|
44
46
|
```
|
45
47
|
|
48
|
+
if you are using SASS: app/assets/stylesheets/application.scss
|
49
|
+
``` scss
|
50
|
+
@import "bootstrap-wysihtml5/bootstrap3-wysihtml5";
|
51
|
+
```
|
52
|
+
|
46
53
|
app/assets/javascripts/application.js
|
47
54
|
```javascript
|
48
55
|
//= require bootstrap-wysihtml5
|
@@ -94,6 +101,11 @@ There is `simple_form` input which you can apply via `as: :wysihtml5` option.
|
|
94
101
|
```erb
|
95
102
|
<%= f.input :content, as: :wysihtml5 %>
|
96
103
|
```
|
104
|
+
Or with [bootstrap3-wysiwyg](https://github.com/bootstrap-wysiwyg/bootstrap3-wysiwyg#options) options
|
105
|
+
|
106
|
+
```erb
|
107
|
+
<%= f.input :content, as: :wysihtml5, wysihtml5: { locale: "es-ES" } %>
|
108
|
+
```
|
97
109
|
|
98
110
|
## If using Turbolinks
|
99
111
|
|
@@ -103,6 +115,39 @@ $(document).on('page:load', function(){
|
|
103
115
|
})
|
104
116
|
```
|
105
117
|
|
118
|
+
## Using bootstrap-wysihtml5-rails with Font Awesome
|
119
|
+
|
120
|
+
In the case you're not using Glyphicons but Font-Awesome, here is how to make Wysihtml5 use Font-Awesome :
|
121
|
+
|
122
|
+
```javascript
|
123
|
+
$(elem).wysihtml5({ toolbar:{ "fa": true } });
|
124
|
+
```
|
125
|
+
|
126
|
+
## Passing options
|
127
|
+
|
128
|
+
To activate direct html editing and disable blockquote:
|
129
|
+
```
|
130
|
+
$('.wysihtml5').wysihtml5({'toolbar': {'blockquote': false, 'html': true}})
|
131
|
+
```
|
132
|
+
|
133
|
+
Toolbal default options are:
|
134
|
+
|
135
|
+
```
|
136
|
+
toolbar: {
|
137
|
+
'font-styles': true,
|
138
|
+
'color': false,
|
139
|
+
'emphasis': {
|
140
|
+
'small': true
|
141
|
+
},
|
142
|
+
'blockquote': true,
|
143
|
+
'lists': true,
|
144
|
+
'html': false,
|
145
|
+
'link': true,
|
146
|
+
'image': true,
|
147
|
+
'smallmodals': false
|
148
|
+
}
|
149
|
+
```
|
150
|
+
|
106
151
|
## License
|
107
152
|
Copyright (c) 2012-2014 Gonzalo Rodríguez-Baltanás Díaz
|
108
153
|
|
@@ -4,7 +4,7 @@ require File.expand_path('../lib/bootstrap-wysihtml5-rails/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["Gonzalo Rodríguez-Baltanás Díaz"]
|
6
6
|
gem.email = ["siotopo@gmail.com"]
|
7
|
-
gem.description = %q{A wysiwyg text editor for
|
7
|
+
gem.description = %q{A wysiwyg text editor for Bootstrap}
|
8
8
|
gem.homepage = "https://github.com/Nerian/bootstrap-wysihtml5-rails"
|
9
9
|
gem.summary = gem.description
|
10
10
|
gem.license = 'MIT'
|
@@ -2,7 +2,7 @@ class Wysihtml5Input < SimpleForm::Inputs::TextInput
|
|
2
2
|
def input(wrapper_options)
|
3
3
|
idf = "#{lookup_model_names.join("_")}_#{reflection_or_attribute_name}"
|
4
4
|
script = template.content_tag(:script, type: 'text/javascript') do
|
5
|
-
"$('textarea[id=#{idf}]').wysihtml5();".html_safe
|
5
|
+
"$('textarea[id=#{idf}]').wysihtml5(#{options[:wysihtml5].to_json});".html_safe
|
6
6
|
end
|
7
7
|
|
8
8
|
super + script
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap-wysihtml5-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.3.
|
4
|
+
version: 0.3.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gonzalo Rodríguez-Baltanás Díaz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
-
description: A wysiwyg text editor for
|
55
|
+
description: A wysiwyg text editor for Bootstrap
|
56
56
|
email:
|
57
57
|
- siotopo@gmail.com
|
58
58
|
executables: []
|
@@ -133,8 +133,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
version: '0'
|
134
134
|
requirements: []
|
135
135
|
rubyforge_project:
|
136
|
-
rubygems_version: 2.
|
136
|
+
rubygems_version: 2.5.1
|
137
137
|
signing_key:
|
138
138
|
specification_version: 4
|
139
|
-
summary: A wysiwyg text editor for
|
139
|
+
summary: A wysiwyg text editor for Bootstrap
|
140
140
|
test_files: []
|