@bigbinary/neeto-editor 1.45.8-beta.0 → 1.45.8-beta.1
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/dist/Editor.js +7 -1
- package/dist/Editor.js.map +1 -1
- package/dist/cjs/Editor.cjs.js +7 -1
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/editor-stats.html +19 -1
- package/package.json +1 -1
package/dist/Editor.js
CHANGED
|
@@ -10588,9 +10588,15 @@ var ImageExtension = Node.create({
|
|
|
10588
10588
|
// an early return will ensure that it fallbacks to tiptap's
|
|
10589
10589
|
// default paste behavior.
|
|
10590
10590
|
var text = event === null || event === void 0 || (_event$clipboardData = event.clipboardData) === null || _event$clipboardData === void 0 ? void 0 : _event$clipboardData.getData("text/plain");
|
|
10591
|
-
if (text) return;
|
|
10592
10591
|
var hasFiles = (_event$clipboardData2 = event.clipboardData) === null || _event$clipboardData2 === void 0 || (_event$clipboardData2 = _event$clipboardData2.files) === null || _event$clipboardData2 === void 0 ? void 0 : _event$clipboardData2.length;
|
|
10593
10592
|
if (!hasFiles) return;
|
|
10593
|
+
if (hasFiles && text) {
|
|
10594
|
+
var _DOMParser$parseFromS;
|
|
10595
|
+
event.preventDefault();
|
|
10596
|
+
var plainText = (_DOMParser$parseFromS = new DOMParser().parseFromString(text, "text/html").body.textContent) !== null && _DOMParser$parseFromS !== void 0 ? _DOMParser$parseFromS : "";
|
|
10597
|
+
view.pasteText(plainText);
|
|
10598
|
+
return;
|
|
10599
|
+
}
|
|
10594
10600
|
var images = Array.from(event.clipboardData.files).filter(function (file) {
|
|
10595
10601
|
return /image/i.test(file.type);
|
|
10596
10602
|
});
|