📝

Smart Notepad

or start typing below

Welcome to Smart Notepad

Start typing your notes here. This editor supports:

  • Rich text formatting - Bold, italic, underline
  • Lists and headings - Organize your content
  • Auto-save - Your work is automatically saved
  • Export options - Save as TXT, HTML, or Markdown

All your data stays on your device - nothing is sent to any server.

Auto-saved
0 words

Export Options

Features: Rich text editing, auto-save, formatting tools, and multiple export formats. Your notes are automatically saved and never leave your device.
${editor.innerHTML} `; downloadFile(html, 'notepad.html', 'text/html'); } function exportAsMarkdown() { let markdown = editor.innerHTML; // Convert HTML to Markdown (basic conversion) markdown = markdown.replace(/]*>(.*?)<\/h1>/gi, '# $1\n\n'); markdown = markdown.replace(/]*>(.*?)<\/h2>/gi, '## $1\n\n'); markdown = markdown.replace(/]*>(.*?)<\/h3>/gi, '### $1\n\n'); markdown = markdown.replace(/]*>(.*?)<\/strong>/gi, '**$1**'); markdown = markdown.replace(/]*>(.*?)<\/em>/gi, '*$1*'); markdown = markdown.replace(/]*>(.*?)<\/u>/gi, '__$1__'); markdown = markdown.replace(/]*>(.*?)<\/li>/gi, '- $1\n'); markdown = markdown.replace(/]*>|<\/ul>/gi, ''); markdown = markdown.replace(/]*>|<\/ol>/gi, ''); markdown = markdown.replace(/]*>(.*?)<\/p>/gi, '$1\n\n'); markdown = markdown.replace(//gi, '\n'); markdown = markdown.replace(/<[^>]*>/g, ''); downloadFile(markdown, 'notepad.md', 'text/markdown'); } function saveToLocal() { saveToLocalStorage(); // Show feedback const btn = event.target; const originalText = btn.textContent; btn.textContent = '✅ Saved!'; btn.style.background = 'rgba(34, 197, 94, 0.3)'; btn.style.borderColor = 'rgba(34, 197, 94, 0.5)'; setTimeout(() => { btn.textContent = originalText; btn.style.background = 'rgba(147, 51, 234, 0.3)'; btn.style.borderColor = 'rgba(147, 51, 234, 0.5)'; }, 2000); } function downloadFile(content, filename, mimeType) { const blob = new Blob([content], { type: mimeType }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } // Keyboard shortcuts document.addEventListener('keydown', (e) => { if (e.ctrlKey || e.metaKey) { switch (e.key) { case 'b': e.preventDefault(); execCommand('bold'); break; case 'i': e.preventDefault(); execCommand('italic'); break; case 'u': e.preventDefault(); execCommand('underline'); break; case 's': e.preventDefault(); saveToLocal(); break; } } });