@textbus/platform-browser 3.8.0 → 3.8.2
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.
- package/bundles/index.esm.js +4 -2
- package/bundles/index.js +4 -2
- package/package.json +3 -3
package/bundles/index.esm.js
CHANGED
@@ -1756,8 +1756,9 @@ let MagicInput = class MagicInput extends Input {
|
|
1756
1756
|
}
|
1757
1757
|
}), fromEvent(textarea, 'paste').subscribe(ev => {
|
1758
1758
|
const text = ev.clipboardData.getData('Text');
|
1759
|
+
const types = Array.from(ev.clipboardData.types || []);
|
1759
1760
|
const files = Array.from(ev.clipboardData.files);
|
1760
|
-
if (files.length) {
|
1761
|
+
if (types.every(type => type === 'Files') && files.length) {
|
1761
1762
|
Promise.all(files.filter(i => {
|
1762
1763
|
return /image/i.test(i.type);
|
1763
1764
|
}).map(item => {
|
@@ -2141,8 +2142,9 @@ let NativeInput = class NativeInput extends Input {
|
|
2141
2142
|
}
|
2142
2143
|
}), fromEvent(textarea, 'paste').subscribe(ev => {
|
2143
2144
|
const text = ev.clipboardData.getData('Text');
|
2145
|
+
const types = Array.from(ev.clipboardData.types || []);
|
2144
2146
|
const files = Array.from(ev.clipboardData.files);
|
2145
|
-
if (files.length) {
|
2147
|
+
if (types.every(type => type === 'Files') && files.length) {
|
2146
2148
|
Promise.all(files.filter(i => {
|
2147
2149
|
return /image/i.test(i.type);
|
2148
2150
|
}).map(item => {
|
package/bundles/index.js
CHANGED
@@ -1758,8 +1758,9 @@ exports.MagicInput = class MagicInput extends Input {
|
|
1758
1758
|
}
|
1759
1759
|
}), stream.fromEvent(textarea, 'paste').subscribe(ev => {
|
1760
1760
|
const text = ev.clipboardData.getData('Text');
|
1761
|
+
const types = Array.from(ev.clipboardData.types || []);
|
1761
1762
|
const files = Array.from(ev.clipboardData.files);
|
1762
|
-
if (files.length) {
|
1763
|
+
if (types.every(type => type === 'Files') && files.length) {
|
1763
1764
|
Promise.all(files.filter(i => {
|
1764
1765
|
return /image/i.test(i.type);
|
1765
1766
|
}).map(item => {
|
@@ -2143,8 +2144,9 @@ exports.NativeInput = class NativeInput extends Input {
|
|
2143
2144
|
}
|
2144
2145
|
}), stream.fromEvent(textarea, 'paste').subscribe(ev => {
|
2145
2146
|
const text = ev.clipboardData.getData('Text');
|
2147
|
+
const types = Array.from(ev.clipboardData.types || []);
|
2146
2148
|
const files = Array.from(ev.clipboardData.files);
|
2147
|
-
if (files.length) {
|
2149
|
+
if (types.every(type => type === 'Files') && files.length) {
|
2148
2150
|
Promise.all(files.filter(i => {
|
2149
2151
|
return /image/i.test(i.type);
|
2150
2152
|
}).map(item => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@textbus/platform-browser",
|
3
|
-
"version": "3.8.
|
3
|
+
"version": "3.8.2",
|
4
4
|
"description": "Textbus is a rich text editor and framework that is highly customizable and extensible to achieve rich wysiwyg effects.",
|
5
5
|
"main": "./bundles/index.js",
|
6
6
|
"module": "./bundles/index.esm.js",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"dependencies": {
|
28
28
|
"@tanbo/di": "^1.1.8",
|
29
29
|
"@tanbo/stream": "^1.2.5",
|
30
|
-
"@textbus/core": "^3.8.
|
30
|
+
"@textbus/core": "^3.8.1",
|
31
31
|
"reflect-metadata": "^0.1.13"
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"bugs": {
|
49
49
|
"url": "https://github.com/textbus/textbus.git/issues"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "c44236787b0f1ab7798197cf710ed3c4baaf10d4"
|
52
52
|
}
|