I have designed my own context menu, wherein I have declared cut,copy,paste options. cut and copy are working fine. Paste is not at all working. If I'm using cut/copy through button and pressing ctrl+v then its getting pasted. I need to use a button to paste the copied text. Please help me out.
Please help me to finish this. -
handleCut=(e)=>{
document.execCommand('cut');
}
handlePaste=(e)=>{
document.execCommand('Paste');
}
<input type='button' value='Cut' onClick={handleCut()} />
<input type='button' value='Paste' onClick={handlePaste()} />