Copy HTML Coped Text From User using javascript

 <!DOCTYPE html>

<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h1>HTML Clipbaord</h1>
    <script>
        const init = async () => {
            let clipboardData = await navigator.clipboard.read();
            const htmlData = await clipboardData[0].getType("text/html");
            console.log("HTML Content:", await htmlData.text());
        }
        init()
    </script>
</body>

</html>

Comments

Popular posts from this blog

Express Production Setup - 4 | HELMET

Express Production Setup - 3 | CORS

Ensuring File Creation in the Current Directory when Converting Python (.py) Script to Executable (.exe).