Advanced Experience Letter Generator
Advanced Experience Letter Generator
Create, save, and download professional experience letters instantly.
Text copied to clipboard!
Generated Letter Preview
Saved Letters
Your User ID for collaboration: Loading…
Modal Title
Modal message content.
');
printWindow.document.close();
printWindow.print();
}// Function to copy the letter text to clipboard
function copyText() {
const text = output.innerText;
if (navigator.clipboard) {
navigator.clipboard.writeText(text).then(() => {
showNotification('Text copied to clipboard!');
}).catch(err => {
console.error('Could not copy text: ', err);
showNotification('Failed to copy text.', 'bg-red-500');
});
} else {
// Fallback for older browsers
const tempElement = document.createElement('textarea');
tempElement.value = text;
document.body.appendChild(tempElement);
tempElement.select();
document.execCommand('copy');
document.body.removeChild(tempElement);
showNotification('Text copied to clipboard!');
}
}// Initialize the app on window load
window.onload = function() {
initializeFirebase();// Add event listeners for the buttons
printButton.addEventListener('click', printLetter);
downloadPdfButton.addEventListener('click', downloadPDF);
copyTextButton.addEventListener('click', copyText);
};