wysihtml-rails 0.5.0.beta10 → 0.5.0.beta11
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8a424f7a7451c2ed2ee295f44fd26f3b8e50cad5
|
|
4
|
+
data.tar.gz: 699e6c52b926edc5bf8ac1eb437018af88d6cf62
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cb041671d6dbfe31ae9d63dfd177dd1d68a034d9ff2725cba285d80f06901395bea1845d5610fe4a08e004c68f482440346a867ef600febbc2cee0f96a2e0634
|
|
7
|
+
data.tar.gz: 0b1f3ca29b5e4f6466df2d59084c6b7f35a2e6c4a03714a1df865eea1084b31190858800d98d5c43e6e9533da5274b50b30255b977ca7da7edc20c3bb56e63a2
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license wysihtml v0.5.0-
|
|
2
|
+
* @license wysihtml v0.5.0-beta11
|
|
3
3
|
* https://github.com/Voog/wysihtml
|
|
4
4
|
*
|
|
5
5
|
* Author: Christopher Blum (https://github.com/tiff)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
var wysihtml5 = {
|
|
13
|
-
version: "0.5.0-
|
|
13
|
+
version: "0.5.0-beta11",
|
|
14
14
|
|
|
15
15
|
// namespaces
|
|
16
16
|
commands: {},
|
|
@@ -388,6 +388,7 @@ var wysihtml5 = {
|
|
|
388
388
|
|
|
389
389
|
ret = (e.childNodes.length !== 1 || s.anchorNode !== e.firstChild || s.anchorOffset !== 2);
|
|
390
390
|
e.parentNode.removeChild(e);
|
|
391
|
+
s.removeAllRanges();
|
|
391
392
|
return ret;
|
|
392
393
|
}
|
|
393
394
|
};
|
|
@@ -5073,7 +5074,7 @@ wysihtml5.browser = (function() {
|
|
|
5073
5074
|
It is on window but cannot return text/html
|
|
5074
5075
|
Should actually check for clipboardData on paste event, but cannot in firefox
|
|
5075
5076
|
*/
|
|
5076
|
-
|
|
5077
|
+
supportsModernPaste: function () {
|
|
5077
5078
|
return !("clipboardData" in window);
|
|
5078
5079
|
},
|
|
5079
5080
|
|
|
@@ -10044,7 +10045,15 @@ wysihtml5.quirks.ensureProperClearing = (function() {
|
|
|
10044
10045
|
|
|
10045
10046
|
if (includePrevLeaves) {
|
|
10046
10047
|
var prevNode = this.getPreviousNode(startNode, true),
|
|
10047
|
-
|
|
10048
|
+
prevLeaf = null;
|
|
10049
|
+
|
|
10050
|
+
if(prevNode) {
|
|
10051
|
+
if (prevNode.nodeType === 1 && wysihtml5.dom.hasClass(prevNode, this.unselectableClass)) {
|
|
10052
|
+
prevLeaf = prevNode;
|
|
10053
|
+
} else {
|
|
10054
|
+
prevLeaf = wysihtml5.dom.domNode(prevNode).lastLeafNode();
|
|
10055
|
+
}
|
|
10056
|
+
}
|
|
10048
10057
|
|
|
10049
10058
|
if (prevLeaf) {
|
|
10050
10059
|
return {
|
|
@@ -15394,7 +15403,7 @@ wysihtml5.views.View = Base.extend(
|
|
|
15394
15403
|
var oldHtml,
|
|
15395
15404
|
cleanHtml;
|
|
15396
15405
|
|
|
15397
|
-
if (wysihtml5.browser.
|
|
15406
|
+
if (wysihtml5.browser.supportsModernPaste()) {
|
|
15398
15407
|
this.on("paste:composer", function(event) {
|
|
15399
15408
|
event.preventDefault();
|
|
15400
15409
|
oldHtml = wysihtml5.dom.getPastedHtml(event);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license wysihtml v0.5.0-
|
|
2
|
+
* @license wysihtml v0.5.0-beta11
|
|
3
3
|
* https://github.com/Voog/wysihtml
|
|
4
4
|
*
|
|
5
5
|
* Author: Christopher Blum (https://github.com/tiff)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
*/
|
|
12
12
|
var wysihtml5 = {
|
|
13
|
-
version: "0.5.0-
|
|
13
|
+
version: "0.5.0-beta11",
|
|
14
14
|
|
|
15
15
|
// namespaces
|
|
16
16
|
commands: {},
|
|
@@ -388,6 +388,7 @@ var wysihtml5 = {
|
|
|
388
388
|
|
|
389
389
|
ret = (e.childNodes.length !== 1 || s.anchorNode !== e.firstChild || s.anchorOffset !== 2);
|
|
390
390
|
e.parentNode.removeChild(e);
|
|
391
|
+
s.removeAllRanges();
|
|
391
392
|
return ret;
|
|
392
393
|
}
|
|
393
394
|
};
|
|
@@ -5073,7 +5074,7 @@ wysihtml5.browser = (function() {
|
|
|
5073
5074
|
It is on window but cannot return text/html
|
|
5074
5075
|
Should actually check for clipboardData on paste event, but cannot in firefox
|
|
5075
5076
|
*/
|
|
5076
|
-
|
|
5077
|
+
supportsModernPaste: function () {
|
|
5077
5078
|
return !("clipboardData" in window);
|
|
5078
5079
|
},
|
|
5079
5080
|
|
|
@@ -10044,7 +10045,15 @@ wysihtml5.quirks.ensureProperClearing = (function() {
|
|
|
10044
10045
|
|
|
10045
10046
|
if (includePrevLeaves) {
|
|
10046
10047
|
var prevNode = this.getPreviousNode(startNode, true),
|
|
10047
|
-
|
|
10048
|
+
prevLeaf = null;
|
|
10049
|
+
|
|
10050
|
+
if(prevNode) {
|
|
10051
|
+
if (prevNode.nodeType === 1 && wysihtml5.dom.hasClass(prevNode, this.unselectableClass)) {
|
|
10052
|
+
prevLeaf = prevNode;
|
|
10053
|
+
} else {
|
|
10054
|
+
prevLeaf = wysihtml5.dom.domNode(prevNode).lastLeafNode();
|
|
10055
|
+
}
|
|
10056
|
+
}
|
|
10048
10057
|
|
|
10049
10058
|
if (prevLeaf) {
|
|
10050
10059
|
return {
|
|
@@ -15394,7 +15403,7 @@ wysihtml5.views.View = Base.extend(
|
|
|
15394
15403
|
var oldHtml,
|
|
15395
15404
|
cleanHtml;
|
|
15396
15405
|
|
|
15397
|
-
if (wysihtml5.browser.
|
|
15406
|
+
if (wysihtml5.browser.supportsModernPaste()) {
|
|
15398
15407
|
this.on("paste:composer", function(event) {
|
|
15399
15408
|
event.preventDefault();
|
|
15400
15409
|
oldHtml = wysihtml5.dom.getPastedHtml(event);
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wysihtml-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.0.
|
|
4
|
+
version: 0.5.0.beta11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tanel Jakobsoo
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-07-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|