I am using the clipboard api to retrieve the clipboard into a variable so I can add information into it and return it to the clipboard. When I return it to the clipboard it does not paste the result and only keeps on the clipboard the previous copy
<script>
const getTextAC = async () => {
const textC= await navigator.clipboard.readText();
var copyTxtori=document.getElementById('route').value;
var copyTxtClip="FS36$whT9Vc2|"+copyTxtori+"|"+textC;
alert(copyTxtClip);
navigator.clipboard.writeText(copyTxtClip);
alert(copyTxtClip);
}
</script>