wysihtml5x-rails 0.4.11 → 0.4.12
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1907d5edb4a6bbbdf40f6d95e5b8bb0a8fd16769
|
4
|
+
data.tar.gz: 3f18eb241af83236b88cf71f83c58cb623a32063
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d5e5b649260f6c3848bd34c55dfbda1ba7562fe4e8b2d16cd796b58b0110f91c92290965d86e3dbeaeb8f1bf8aaefa76540c5bedf3611b7dd4eada9c28b3143
|
7
|
+
data.tar.gz: 5b2383c3215776c3412defa93781c037a31814828c684cc9536eca3dc516b2aa3d06c365fbdf32e18f850819c4405d233b1d7ac9e7a6ca0011b5dc54a0972620
|
@@ -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.
|
28
|
+
* @license wysihtml5x v0.4.12
|
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.
|
39
|
+
version: "0.4.12",
|
40
40
|
|
41
41
|
// namespaces
|
42
42
|
commands: {},
|
@@ -7046,6 +7046,13 @@ wysihtml5.dom.replaceWithChildNodes = function(node) {
|
|
7046
7046
|
unset = function() {
|
7047
7047
|
if (view.hasPlaceholderSet()) {
|
7048
7048
|
view.clear();
|
7049
|
+
view.element.focus();
|
7050
|
+
setTimeout(function() {
|
7051
|
+
var sel = view.selection.getSelection();
|
7052
|
+
if (!sel.focusNode || !sel.anchorNode) {
|
7053
|
+
view.selection.selectNode(view.element.firstChild || view.element);
|
7054
|
+
}
|
7055
|
+
}, 0);
|
7049
7056
|
}
|
7050
7057
|
view.placeholderSet = false;
|
7051
7058
|
dom.removeClass(view.element, CLASS_NAME);
|
@@ -11845,7 +11852,7 @@ wysihtml5.views.View = Base.extend(
|
|
11845
11852
|
|
11846
11853
|
isEmpty: function() {
|
11847
11854
|
var innerHTML = this.element.innerHTML.toLowerCase();
|
11848
|
-
return (
|
11855
|
+
return (/^(\s|<br>|<\/br>|<p>|<\/p>)*$/i).test(innerHTML) ||
|
11849
11856
|
innerHTML === "" ||
|
11850
11857
|
innerHTML === "<br>" ||
|
11851
11858
|
innerHTML === "<p></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.
|
28
|
+
* @license wysihtml5x v0.4.12
|
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.
|
39
|
+
version: "0.4.12",
|
40
40
|
|
41
41
|
// namespaces
|
42
42
|
commands: {},
|
@@ -7046,6 +7046,13 @@ wysihtml5.dom.replaceWithChildNodes = function(node) {
|
|
7046
7046
|
unset = function() {
|
7047
7047
|
if (view.hasPlaceholderSet()) {
|
7048
7048
|
view.clear();
|
7049
|
+
view.element.focus();
|
7050
|
+
setTimeout(function() {
|
7051
|
+
var sel = view.selection.getSelection();
|
7052
|
+
if (!sel.focusNode || !sel.anchorNode) {
|
7053
|
+
view.selection.selectNode(view.element.firstChild || view.element);
|
7054
|
+
}
|
7055
|
+
}, 0);
|
7049
7056
|
}
|
7050
7057
|
view.placeholderSet = false;
|
7051
7058
|
dom.removeClass(view.element, CLASS_NAME);
|
@@ -11845,7 +11852,7 @@ wysihtml5.views.View = Base.extend(
|
|
11845
11852
|
|
11846
11853
|
isEmpty: function() {
|
11847
11854
|
var innerHTML = this.element.innerHTML.toLowerCase();
|
11848
|
-
return (
|
11855
|
+
return (/^(\s|<br>|<\/br>|<p>|<\/p>)*$/i).test(innerHTML) ||
|
11849
11856
|
innerHTML === "" ||
|
11850
11857
|
innerHTML === "<br>" ||
|
11851
11858
|
innerHTML === "<p></p>" ||
|