JavaScript How does pasting an image work, e.g. when composing a PF post?

Summary
How to implement this thing where you can paste an image when composing a post on Physics Forums?
I have pasted the image below after copying it from my desktop. The image becomes visible in the Post Composer as soon as you paste it. It also works if you copy from another web page.

I assume that JavaScript is able to grab the data from the clipboard and create an IMG element on the fly, and also send the IMG data to the PF server. It can also create a thumbnail version.
How to code these functions?


1564358555005.jpeg
 

Want to reply to this thread?

"How does pasting an image work, e.g. when composing a PF post?" You must log in or register to reply here.

Related Threads for: How does pasting an image work, e.g. when composing a PF post?

Replies
13
Views
2K
Replies
2
Views
2K
Replies
1
Views
2K
  • Posted
Replies
13
Views
2K
Replies
5
Views
902

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top