Force pasting as text/plain

Is there a way to force paste to parse the plain text version (e.g. when pasting via Shift Cmd V) and never attempt to parse it as HTML? I want to be able to preserve all the whitespace.

It looks like I can override transformPastedHTML and clipboardParser to preserve whitespace but seeing as ProseMirror has the logic already I was wondering if there were a better way to utilize it?

Shift-Cmd-V should do this.

1 Like

I’m wondering if it’s possible to force the Shift-Cmd-V behavior when a user presses Cmd-V.

Not currently, no. This kind of thing is still hard-code (see view/src/input.js).