wysihtml5x-rails 0.4.10 → 0.4.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19746f9d353549d31664fc824b614eca58acf324
4
- data.tar.gz: e3905fe82cc05f0801cfe508d0e510ac73591659
3
+ metadata.gz: b947a36a20f9fb548d69f5d19a3d3598764c897c
4
+ data.tar.gz: beea337fa9d8a0fab17c87456c8b9d508545e8e8
5
5
  SHA512:
6
- metadata.gz: 051414796cc17ad93affe186b5ee09efdd599eec5751da9f799fc086363c7291514fcb720eacf3e4f2b356bba59be7e389af2bd71f5ed587a9d719b25cf312d4
7
- data.tar.gz: 4f69dd9cc72de56846c739cd50ddcdf51a2331c981be53938713322de015119a4a7b249e1087c58c09cdb1c44a9c1466b39dc745295e6ae59992ff49cde0f867
6
+ metadata.gz: 9b730a0844fc040d82807bff6b7f16ce8cb4d0af011de4b204e010f993a6a519cd0268f5e225d82277700a981d7712edc3c7c0e6a022adfa5340d084e6f60e51
7
+ data.tar.gz: 3d20acf3e2991c32e150a20a0db8c12b3a5ebe971753c6de618792933d50b5bbc941fe1e967ced1625abcff650222ed7e14bfb8d048f691a932b1e2bdf2d879e
@@ -1,5 +1,5 @@
1
1
  module Wysihtml5x
2
2
  module Rails
3
- VERSION = "0.4.10"
3
+ VERSION = "0.4.11"
4
4
  end
5
5
  end
@@ -81,13 +81,20 @@ var wysihtml5ParserRules = {
81
81
  * - add_class: converts and deletes the given HTML4 attribute (align, clear, ...) via the given method to a css class
82
82
  * The following methods are implemented in wysihtml5.dom.parse:
83
83
  * - align_text: converts align attribute values (right/left/center/justify) to their corresponding css class "wysiwyg-text-align-*")
84
- * <p align="center">foo</p> ... becomes ... <p> class="wysiwyg-text-align-center">foo</p>
84
+ * <p align="center">foo</p> ... becomes ... <p class="wysiwyg-text-align-center">foo</p>
85
85
  * - clear_br: converts clear attribute values left/right/all/both to their corresponding css class "wysiwyg-clear-*"
86
86
  * <br clear="all"> ... becomes ... <br class="wysiwyg-clear-both">
87
87
  * - align_img: converts align attribute values (right/left) on <img> to their corresponding css class "wysiwyg-float-*"
88
- *
88
+ *
89
+ * - add_style: converts and deletes the given HTML4 attribute (align) via the given method to a css style
90
+ * The following methods are implemented in wysihtml5.dom.parse:
91
+ * - align_text: converts align attribute values (right/left/center) to their corresponding css style)
92
+ * <p align="center">foo</p> ... becomes ... <p style="text-align:center">foo</p>
93
+ *
89
94
  * - remove: removes the element and its content
90
95
  *
96
+ * - unwrap removes element but leaves content
97
+ *
91
98
  * - rename_tag: renames the element to the given tag
92
99
  *
93
100
  * - set_class: adds the given class to the element (note: make sure that the class is in the "classes" white list above)
@@ -100,6 +107,7 @@ var wysihtml5ParserRules = {
100
107
  * - href: allows something like "mailto:bert@foo.com", "http://google.com", "/foobar.jpg"
101
108
  * - alt: strips unwanted characters. if the attribute is not set, then it gets set (to ensure valid and compatible HTML)
102
109
  * - numbers: ensures that the attribute only contains numeric characters
110
+ * - any: allows anything to pass
103
111
  */
104
112
  "tags": {
105
113
  "tr": {
@@ -180,11 +188,11 @@ var wysihtml5ParserRules = {
180
188
  },
181
189
  "a": {
182
190
  "check_attributes": {
191
+ "target": "any",
183
192
  "href": "url" // if you compiled master manually then change this from 'url' to 'href'
184
193
  },
185
194
  "set_attributes": {
186
- "rel": "nofollow",
187
- "target": "_blank"
195
+ "rel": "nofollow"
188
196
  }
189
197
  },
190
198
  "img": {
@@ -550,4 +558,4 @@ var wysihtml5ParserRules = {
550
558
  "rename_tag": "div"
551
559
  }
552
560
  }
553
- };
561
+ };
@@ -25,7 +25,7 @@ if(!Array.isArray) {
25
25
  return Object.prototype.toString.call(arg) === '[object Array]';
26
26
  };
27
27
  };/**
28
- * @license wysihtml5x v0.4.10
28
+ * @license wysihtml5x v0.4.11
29
29
  * https://github.com/Edicy/wysihtml5
30
30
  *
31
31
  * Author: Christopher Blum (https://github.com/tiff)
@@ -36,7 +36,7 @@ if(!Array.isArray) {
36
36
  *
37
37
  */
38
38
  var wysihtml5 = {
39
- version: "0.4.10",
39
+ version: "0.4.11",
40
40
 
41
41
  // namespaces
42
42
  commands: {},
@@ -11845,7 +11845,8 @@ wysihtml5.views.View = Base.extend(
11845
11845
 
11846
11846
  isEmpty: function() {
11847
11847
  var innerHTML = this.element.innerHTML.toLowerCase();
11848
- return innerHTML === "" ||
11848
+ return (/^\s*$/i).test(innerHTML) ||
11849
+ innerHTML === "" ||
11849
11850
  innerHTML === "<br>" ||
11850
11851
  innerHTML === "<p></p>" ||
11851
11852
  innerHTML === "<p><br></p>" ||
@@ -25,7 +25,7 @@ if(!Array.isArray) {
25
25
  return Object.prototype.toString.call(arg) === '[object Array]';
26
26
  };
27
27
  };/**
28
- * @license wysihtml5x v0.4.10
28
+ * @license wysihtml5x v0.4.11
29
29
  * https://github.com/Edicy/wysihtml5
30
30
  *
31
31
  * Author: Christopher Blum (https://github.com/tiff)
@@ -36,7 +36,7 @@ if(!Array.isArray) {
36
36
  *
37
37
  */
38
38
  var wysihtml5 = {
39
- version: "0.4.10",
39
+ version: "0.4.11",
40
40
 
41
41
  // namespaces
42
42
  commands: {},
@@ -11845,7 +11845,8 @@ wysihtml5.views.View = Base.extend(
11845
11845
 
11846
11846
  isEmpty: function() {
11847
11847
  var innerHTML = this.element.innerHTML.toLowerCase();
11848
- return innerHTML === "" ||
11848
+ return (/^\s*$/i).test(innerHTML) ||
11849
+ innerHTML === "" ||
11849
11850
  innerHTML === "<br>" ||
11850
11851
  innerHTML === "<p></p>" ||
11851
11852
  innerHTML === "<p><br></p>" ||
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wysihtml5x-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.10
4
+ version: 0.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanel Jakobsoo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-27 00:00:00.000000000 Z
11
+ date: 2014-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties