How to obtain/get copied image from clipboard data in browser

JS code works well for Chrome, Firefox and Safari

    const source = document.querySelector('.source');
    source.addEventListener('paste', (event) => {
        if (event.clipboardData && 
            event.clipboardData.items && 
            event.clipboardData.items.length == 1) {
                const item = event.clipboardData.items[0];
                if (item.kind == 'file' && item.type == 'image/png') {
                        let blob = item.getAsFile();
                        let f = new FileReader();
                        f.onload = (e) => {
                                console.log(e.target.result);
                        }
                        f.readAsDataURL(blob);
                }
        }
        event.preventDefault();
    });

Image source to data base64 url from clipboard data

JSCodeGetImageBlobFromClipboardData

How to add Lombok to your project : Lombok Dependency is missing

Lombok Dependency is missing

Lombok Dependency is missing

How to add Lombok to your project

Enable Anotation

@qzl/typed-i18n — Our Open-Source Typed i18n Project is Gaining Traction

 Hello everyone! πŸ‘‹ We are excited to share an update about one of our open-source projects , @qzl/typed-i18n , created by the QZ-L.com team...