Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste Extension: keyboard shortcut paste not working when forcePlainText is set to true #1580

Open
nina-rafieifar opened this issue Jun 24, 2021 · 0 comments

Comments

@nina-rafieifar
Copy link

Description

When you use the clipboard event everything works just fine. It's when you paste using cmd+v or ctrl+v that it doesn't work. However, if I set the forcePlainText is set to false it will work. But then it does paste all the styling and tags with it. I couldn't use any of the other configs to remove the tags and stylings either to get around this issue.

Steps to reproduce

  1. Set the forcePlainText to true
  2. Paste using keyboard commands (cmd + v)
  3. Subscript to the editablePaste event
  4. Nothing is pasted to the input area but the event is fired. Basically the event passed down to the function is different from the event passed down when you paste using the clipboard.

Expected behavior: [What you expected to happen]

Pasting text with cmd+v should work using the default values (forcePlainTextset totrueandcleanPastedHTMLtotrue`). It also should remove all the stylings, tags and other attributes and paste it as a plain text by default.

Actual behavior: [What actually happened]

cmd+v doesn't work.

Versions

  • medium-editor: 5.23.3
  • browser: Chrome, Safari
  • OS: MacOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant