@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.
@@ -10608,9 +10608,15 @@ var ImageExtension = Menu$3.Node.create({
10608
10608
  // an early return will ensure that it fallbacks to tiptap's
10609
10609
  // default paste behavior.
10610
10610
  var text = event === null || event === void 0 || (_event$clipboardData = event.clipboardData) === null || _event$clipboardData === void 0 ? void 0 : _event$clipboardData.getData("text/plain");
10611
- if (text) return;
10612
10611
  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;
10613
10612
  if (!hasFiles) return;
10613
+ if (hasFiles && text) {
10614
+ var _DOMParser$parseFromS;
10615
+ event.preventDefault();
10616
+ var plainText = (_DOMParser$parseFromS = new DOMParser().parseFromString(text, "text/html").body.textContent) !== null && _DOMParser$parseFromS !== void 0 ? _DOMParser$parseFromS : "";
10617
+ view.pasteText(plainText);
10618
+ return;
10619
+ }
10614
10620
  var images = Array.from(event.clipboardData.files).filter(function (file) {
10615
10621
  return /image/i.test(file.type);
10616
10622
  });