title: How can I change the behavior of tiptap when pasting plain text?
body: <p>I'm currently trying to implement a visual editor using a library called tiptap.</p>
  <p><a href="https://v1.tiptap.dev/" rel="nofollow noreferrer">https://v1.tiptap.dev/</a></p>
  <p>I think v2 is the most common tiptap, but there are circumstances where v1 must be used.</p>
  <p>However, I was not satisfied with the behavior when I pasted plain text into tiptap, and when I looked into it, I found that the condition set in the library prosemirror was different from what I expected.</p>
  <p><a href="https://github.com/ProseMirror/prosemirror-view/blob/master/src/clipboard.js#L57-L59" rel="nofollow noreferrer">https://github.com/ProseMirror/prosemirror-view/blob/master/src/clipboard.js#L57-L59</a></p>
  <pre><code>text.trim().split(/(?:\r\n?|\n)+/).forEach(block =&gt; {
   dom.appendChild(document.createElement(&quot;p&quot;)).appendChild(serializer.serializeNode(schema.text(block, marks)))
  })
  </code></pre>
  <p>It seems that prosemirror converts a single newline to <code>&lt;p&gt;&lt;/p&gt;</code>.
  I would like to change the condition so that it converts to <code>&lt;br&gt;</code> if there is one newline, and <code>&lt;p&gt;&lt;/p&gt;</code> if there are two newlines.
  But I don't know how to make it happen, and I'm having a very hard time.</p>
  <pre><code>editorProps: {
    clipboardTextParser(text, $context) {
      console.log(text)
      console.log($context)
      // :(
    }
  }
  </code></pre>
  <p>I started by using tiptap's <code>EditorProps</code> feature to overwrite the entire processing of prosemirror's <code>clipboardTextParser</code>.
  However, <code>clipboardTextParser</code> uses a number of variables and objects in prosemirror, and I have no idea how to write them in editorProps.
  And I gave up because I didn't know how to proceed.</p>
  <p>Is there any way to solve this?
  I'm thinking that if tiptap can do almost the same thing as <code>clipboardTextParser</code>, it should be fine.</p>
  <p>Pardon my broken English.
  Please help me!</p>