๐ŸŽฏ AI Slides Generator
0 slides 0 chars
Preview
0 / 0
๐Ÿ“ Speaker Notes

โœจ Pro Themes & Features

Unlock premium themes, custom branding, and more

Support on Ko-fi โ€” $14
0 / 0
'); printWin.document.close(); setTimeout(() => { printWin.print(); }, 500); } // ===== Keyboard Shortcuts ===== document.addEventListener('keydown', function(e) { // Don't capture when typing in editor if (e.target.tagName === 'TEXTAREA' || e.target.tagName === 'INPUT') return; const fsActive = document.getElementById('fullscreenOverlay').classList.contains('active'); if (e.key === 'Escape' && fsActive) { exitFullscreen(); e.preventDefault(); } if (e.key === 'ArrowLeft') { if (fsActive) fsNav(-1); else prevSlide(); e.preventDefault(); } if (e.key === 'ArrowRight') { if (fsActive) fsNav(1); else nextSlide(); e.preventDefault(); } }); // Also handle keyboard in fullscreen document.getElementById('fullscreenOverlay').addEventListener('keydown', function(e) { if (e.key === 'Escape') exitFullscreen(); if (e.key === 'ArrowLeft') fsNav(-1); if (e.key === 'ArrowRight') fsNav(1); }); // ===== Init ===== document.addEventListener('DOMContentLoaded', function() { const editor = document.getElementById('editor'); // Load saved content or sample const saved = localStorage.getItem('ai-slides-content'); const savedTheme = localStorage.getItem('ai-slides-theme'); editor.value = saved || sampleMarkdown; if (savedTheme) { currentTheme = savedTheme; document.getElementById('themeSelect').value = savedTheme; } // Debounced update let timeout; editor.addEventListener('input', function() { clearTimeout(timeout); timeout = setTimeout(updateSlides, 150); }); // Tab key support in editor editor.addEventListener('keydown', function(e) { if (e.key === 'Tab') { e.preventDefault(); const start = this.selectionStart; this.value = this.value.substring(0, start) + ' ' + this.value.substring(this.selectionEnd); this.selectionStart = this.selectionEnd = start + 2; updateSlides(); } }); // Initial render updateSlides(); });