prosemirror-view 1.32.2 → 1.32.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 1.32.3 (2023-11-01)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix a bug where, in some situations, pasting plain text pasted HTML markup.
6
+
1
7
  ## 1.32.2 (2023-10-27)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -3994,7 +3994,7 @@ function doPaste(view, text, html, preferPlain, event) {
3994
3994
  }
3995
3995
 
3996
3996
  function getText(clipboardData) {
3997
- var text = clipboardData.getData("text/html") || clipboardData.getData("Text");
3997
+ var text = clipboardData.getData("text/plain") || clipboardData.getData("Text");
3998
3998
  if (text) return text;
3999
3999
  var uris = clipboardData.getData("text/uri-list");
4000
4000
  return uris ? uris.replace(/\r?\n/g, " ") : "";
package/dist/index.js CHANGED
@@ -3523,7 +3523,7 @@ function doPaste(view, text, html, preferPlain, event) {
3523
3523
  return true;
3524
3524
  }
3525
3525
  function getText(clipboardData) {
3526
- let text = clipboardData.getData("text/html") || clipboardData.getData("Text");
3526
+ let text = clipboardData.getData("text/plain") || clipboardData.getData("Text");
3527
3527
  if (text)
3528
3528
  return text;
3529
3529
  let uris = clipboardData.getData("text/uri-list");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prosemirror-view",
3
- "version": "1.32.2",
3
+ "version": "1.32.3",
4
4
  "description": "ProseMirror's view component",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
package/src/input.ts CHANGED
@@ -609,7 +609,7 @@ export function doPaste(view: EditorView, text: string, html: string | null, pre
609
609
  }
610
610
 
611
611
  function getText(clipboardData: DataTransfer) {
612
- let text = clipboardData.getData("text/html") || clipboardData.getData("Text")
612
+ let text = clipboardData.getData("text/plain") || clipboardData.getData("Text")
613
613
  if (text) return text
614
614
  let uris = clipboardData.getData("text/uri-list")
615
615
  return uris ? uris.replace(/\r?\n/g, " ") : ""