How can I paste JavaScript-copied text into TinyMCE as HTML?

How can I paste the JS copied text to html in TinyMCE? I’m trying to click the copy button to copy HTML code in input or other elements and then paste it in TinyMCE, but it come out as text. Hopefully, get it work with like copy and pasting like google map and other html element. Please help.

`<!DOCTYPE html>
<html>
<head>
<script
src="https://code.jquery.com/jquery-3.6.4.slim.min.js"
integrity="sha256-a2yjHM4jnF9f54xUQakjZGaqYs/V1CYvWpoqZzC2/Bw="
crossorigin="anonymous"></script>
<script src='https://cdn.tiny.cloud/1/qagffr3pkuv17a8on1afax661irst1hbr4e6tbv888sz91jc/tinymce/5/tinymce.min.js'></script>
</head>
<body>

<textarea id='t'></textarea>

<input type="text" value="<b>Hello World</b>" id="myInput">
<button onclick="myFunction()">Copy text</button>

<script>

tinymce.init({
selector: 'textarea', // change this value according to your HTML
content_style: 'div.item { display:inline-block; width:150px; height:200px; padding: 10px; margin: 10px; box-shadow: 0 3px 10px rgb(0 0 0 / 0.2); border-radius: 10px; vertical-align: top; }',
plugins: 'anchor autolink charmap codesample emoticons image link lists media searchreplace table visualblocks wordcount checklist mediaembed casechange export formatpainter pageembed linkchecker a11ychecker tinymcespellchecker permanentpen powerpaste advtable advcode editimage tinycomments tableofcontents footnotes mergetags autocorrect typography inlinecss noneditable paste',
toolbar: 'undo redo | blocks fontfamily fontsize | bold italic underline strikethrough | link image media table mergetags | addcomment showcomments | spellcheckdialog a11ycheck typography | align lineheight | checklist numlist bullist indent outdent | emoticons charmap | removeformat',
tinycomments_mode: 'embedded',
tinycomments_author: 'Author name',
mergetags_list: [
{ value: 'First.Name', title: 'First Name' },
{ value: 'Email', title: 'Email' },
],
branding: false,
keep_styles:false,
extended_valid_elements:'var,pvar',
custom_elements:'var,pvar',
forced_root_block: false,
verify_html: false,
cleanup: false,
cleanup_on_startup: false,
paste_as_text: false,

paste_auto_cleanup_on_paste : false,
entity_encoding : "raw"
});

function myFunction() {

// Get the text field
var copyText = document.getElementById("myInput");

// Select the text field
copyText.select();
copyText.setSelectionRange(0, 99999); // For mobile devices

// Copy the text inside the text field
navigator.clipboard.writeText(copyText.value);

// Alert the copied text

}
</script>

</body>
</html>

Hello World

    <b>Hello World</b>`