Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
React Draft Wysiwyg onPaste event not providing clipboard information

The event from onPaste has no clipboard information. When event.clipboardData is run it returns undefined regardless of the paste being a text or image.

<Editor
 toolbarOnFocus
 onPaste={(event) => this.Copy_Paste_Pictures_PO(event)}
 toolbarClassName='toolbar-class-new'
 editorClassName={"toolbar-editor-class"}
 onEditorStateChange={this.onEditorStateChange_PO}
/>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Unfortunately, I was unable to get the onPaste to provide any clipboard data about an image. The solution is to check if a user pasted text by comparing editor objects. If the paste is not a text (editor object remains the same) pop up an intermediary paste interface. The intermediary interface onPaste provides image information. Upload the image to the server and use the return URL to insert the image into the editor state. The limitation to this solution is a user cannot simultaneously paste text and images.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!