AI Notes Smart Copy

# AI NOTES SMART COPY – PRODUCTION TOOL (100% FUNCTIONAL)

AI Notes Smart Copy

Paste • Detect • Format • Edit • Preview • Copy • Download • Save

Saved ✓

Transform Your Messy Notes

Paste your class notes, web excerpts, or study material to automatically format them into clean, structured study notes.

Input Notes
Words: 0
Chars: 0
Lines: 0
Paragraphs: 0
Reading Time: 0m
Formatted Notes
Original:
Formatted:
Matches: 0
Question / Term
Click format to generate flashcards from your notes.
0 / 0
Ready
Recent Notes
    Action completed successfully
    `; }navigator.clipboard.writeText(textToCopy).then(() => { showToast("✓ Copied successfully"); }).catch(() => { const textareaFallback = document.createElement('textarea'); textareaFallback.value = textToCopy; document.body.appendChild(textareaFallback); textareaFallback.select(); try { document.execCommand('copy'); showToast("✓ Copied successfully"); } catch (e) { showToast("Clipboard access denied. Please copy manually."); } document.body.removeChild(textareaFallback); }); }function downloadFile(type) { const text = state.formattedContent || outputEditor.value; let filename = (noteTitleInput.value.trim() || 'notes') + '.' + type; let mime = 'text/plain'; if (type === 'md') mime = 'text/markdown'; if (type === 'html') mime = 'text/html';let content = text; if (type === 'html') { content = `${escapeHTML(noteTitleInput.value)}${previewView.innerHTML}`; }const blob = new Blob([content], { type: mime }); 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); showToast(`Downloaded ${filename}`); }function saveCurrentNote() { const title = noteTitleInput.value.trim() || 'Untitled Note'; const noteObj = { id: state.currentId || Date.now(), title: title, input: state.inputContent, formatted: state.formattedContent || outputEditor.value, formatStyle: state.formatStyle, createdAt: state.currentId ? (state.recentNotes.find(n => n.id === state.currentId)?.createdAt || new Date().toLocaleString()) : new Date().toLocaleString(), updatedAt: new Date().toLocaleString(), words: state.inputContent.trim().split(/\s+/).length };if (state.currentId) { state.recentNotes = state.recentNotes.map(n => n.id === state.currentId ? noteObj : n); } else { state.currentId = noteObj.id; state.recentNotes.unshift(noteObj); }if (state.recentNotes.length > 15) state.recentNotes.pop(); localStorage.setItem('ansc_recent_notes', JSON.stringify(state.recentNotes)); renderRecentNotes(); showToast("Note saved successfully!"); autoSaveStatus.textContent = "Saved ✓"; }function triggerAutoSave() { autoSaveStatus.textContent = "Saving..."; clearTimeout(autoSaveTimer); autoSaveTimer = setTimeout(() => { if (state.inputContent.trim().length > 0) { saveCurrentNote(); } }, 800); }function renderRecentNotes() { const listEl = document.getElementById('ansc-recent-list'); listEl.innerHTML = ''; if (state.recentNotes.length === 0) { listEl.innerHTML = '
  • No saved notes yet.
  • '; return; }state.recentNotes.forEach(note => { const li = document.createElement('li'); li.className = 'ansc-recent-item'; li.innerHTML = `
    ${escapeHTML(note.title)} Updated: ${note.updatedAt} • ${note.words} words
    `; listEl.appendChild(li); }); }window.anscLoadNote = function(id) { const note = state.recentNotes.find(n => n.id === id); if (note) { state.currentId = note.id; noteTitleInput.value = note.title; textarea.value = note.input; state.inputContent = note.input; outputEditor.value = note.formatted; state.formattedContent = note.formatted; formatStyleSelect.value = note.formatStyle || 'clean'; state.formatStyle = formatStyleSelect.value; updateStats(); checkEmptyState(); showToast(`Loaded "${note.title}"`); } };window.anscDuplicateNote = function(id) { const note = state.recentNotes.find(n => n.id === id); if (note) { const dup = { ...note, id: Date.now(), title: note.title + " (Copy)", updatedAt: new Date().toLocaleString() }; state.recentNotes.unshift(dup); localStorage.setItem('ansc_recent_notes', JSON.stringify(state.recentNotes)); renderRecentNotes(); showToast("Note duplicated"); } };window.anscDeleteNote = function(id) { if (!confirm("Are you sure you want to delete this saved note?")) return; state.recentNotes = state.recentNotes.filter(n => n.id !== id); localStorage.setItem('ansc_recent_notes', JSON.stringify(state.recentNotes)); renderRecentNotes(); showToast("Note deleted"); };function showToast(msg) { toast.textContent = msg; toast.classList.add('show'); setTimeout(() => { toast.classList.remove('show'); }, 2500); }function escapeHTML(str) { return str.replace(/[&<>'"]/g, tag => ({ '&': '&', '<': '<', '>': '>', "'": ''', '"': '"' }[tag] || tag) ); }init(); })();