I have the following page:
<h1>Paste here content!</h1>
<label for="ace">
<div style="min-width:500px;min-height:500px;background-color:#121212;">
</div>
</label>
<input id="ace" style="display:none" type="file" name="file">
Now I want when right-click on div to programmatically paste data to the input with id ace
. Is that even possible?
In another words supposing that we copied a file from the filesystem and somewherer we have a button/link/<li>
element that says Paste
. How can I by clicking on it to fire a paste event to the input element? Any library is acceptable.