This same question came up in this 2018 discussion, but I’d like to ask again, since this still seems to be an issue.
Mac has Cmd+Shift+V, and a corresponding menu item called “Paste and match style”. Windows has Ctrl+Shift+V, and a corresponding menu item called “Paste as plain text.” I have a couple of questions:
ProseMirror does not seem to actually match the style. If I am in bold text and I do “paste and match style” (either via the keyboard or the menu), I would hope the pasted text would be bold. Would it be appropriate for me to file a GitHub issue for this?
If we were to implement this ourselves in one of our plugins, what do you think might be the right approach (the right event handlers to define)?
As an aside, ProseMirror appears to have code that explicitly checks the state of the shift key in order to decide whether the paste is plaintext or not — e.g. see functions
text/plain is on the clipboard, without
text/html. Anyway, I’m not sure if this issue with the shift key actually has any material impact on how ProseMirror behaves, but I thought I would point it out.
- Mike Morearty, Asana