         };
        
            const showToolbar = () => {
                toolbarEle.style.opacity = 1;
                toolbarEle.style.visibility = 'visible';
            };
        
            document.addEventListener('selectionchange', () => {
                const selection = window.getSelection().toString();
                if (!selection) {
                    hideToolbar();
                }
            });
        
            textarea.addEventListener('mouseup', () => {
                const 