Smart AI Copy

Workflow:
View Mode:
Copy:
Export / Print:

Advanced AI Research Notes & Equations

Welcome to the professional AI Smart Document Editor. Paste your AI-generated notes, repair mathematical symbols, and manage embedded diagrams seamlessly.

1. Mathematical Symbols & Equations

Mathematical expressions such as $x^2 + y^2 = z^2$, $E = mc^2$, $H_2O$, $CO_2$, and $a_1 + a_2 + a_3$ render natively with proper superscript and subscript support.

Advanced LaTeX blocks like $\sum$, $\int$, $\sqrt{x^2 + y^2}$, and $\frac{a}{b}$ are automatically translated and preserved.

2. Structured Data Table

ConstantSymbolApproximation
Pi Ratio$\pi$$3.14159$
Golden Ratio$\phi$$1.61803$

3. Embedded Diagram Architecture

Vector graphics and architectural charts remain fully interactive and scalable:

Smart Parser Safe Document
'; const blob = new Blob([docxHeader + html + docxFooter], { type: 'application/msword;charset=utf-8' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `ai-smart-notes-${Date.now()}.doc`; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); showToast('Word Document exported successfully'); }function printNotes() { const editor = document.getElementById('asn-editor-content'); if (!editor) return; const win = window.open('', '_blank'); if (!win) { showToast('Popup blocked. Allow popups to print.', true); return; } win.document.write(`Print Notes${repairSymbols(editor.innerHTML)}`); win.document.close(); win.focus(); setTimeout(() => { win.print(); win.close(); }, 300); }document.addEventListener('DOMContentLoaded', () => { const editor = document.getElementById('asn-editor-content'); if (!editor) return;let inputTimer; editor.addEventListener('input', () => { clearTimeout(inputTimer); inputTimer = setTimeout(() => saveStateToHistory(), 600); });editor.addEventListener('click', (e) => { const diagNode = e.target.closest('.asn-diagram-node'); const diagToolbar = document.getElementById('asn-diagram-toolbar'); document.querySelectorAll('.asn-diagram-node').forEach(n => n.classList.remove('selected')); if (diagNode) { diagNode.classList.add('selected'); state.selectedDiagram = diagNode; if (diagToolbar) diagToolbar.style.display = 'flex'; } else { state.selectedDiagram = null; if (diagToolbar) diagToolbar.style.display = 'none'; } });const bindClick = (id, handler) => { const btn = document.getElementById(id); if (btn && !btn.dataset.bound) { btn.dataset.bound = 'true'; btn.addEventListener('click', (e) => { e.preventDefault(); handler(e); }); } };// Workflow Action Bindings bindClick('asn-smart-paste-btn', async () => { try { const text = await navigator.clipboard.readText(); handleSmartPaste(text); } catch (err) { const manualInput = prompt('Paste your AI Notes here:'); if (manualInput) handleSmartPaste(manualInput); } });bindClick('asn-fix-symbols-btn', () => { saveStateToHistory(); editor.innerHTML = repairSymbols(editor.innerHTML); showToast('Symbols repaired successfully'); });bindClick('asn-doc-check-btn', runDocumentQualityCheck); bindClick('asn-undo-btn', executeUndo); bindClick('asn-redo-btn', executeRedo);// View Mode Toggle Bindings document.querySelectorAll('.asn-view-btn').forEach(btn => { if (btn.dataset.bound) return; btn.dataset.bound = 'true'; btn.addEventListener('click', (e) => { e.preventDefault(); document.querySelectorAll('.asn-view-btn').forEach(b => b.classList.remove('active')); btn.classList.add('active'); const view = btn.dataset.view; if (view === 'editor') { editor.setAttribute('contenteditable', 'true'); showToast('Switched to Editor Mode'); } else if (view === 'preview') { editor.setAttribute('contenteditable', 'false'); showToast('Switched to Preview Mode'); } else if (view === 'print') { printNotes(); } }); });bindClick('asn-copy-full-btn', copyFullNotes); bindClick('asn-copy-word-btn', copyForWord); bindClick('asn-copy-html-btn', async () => { await navigator.clipboard.writeText(editor.innerHTML); showToast('Copied HTML source'); }); bindClick('asn-copy-plain-btn', async () => { await navigator.clipboard.writeText(editor.textContent || editor.innerText); showToast('Copied as Plain Text'); }); bindClick('asn-export-word-btn', exportWordDocument); bindClick('asn-print-pdf-btn', printNotes);document.querySelectorAll('.asn-fmt-btn[data-cmd]').forEach(btn => { if (btn.dataset.bound) return; btn.dataset.bound = 'true'; btn.addEventListener('click', (e) => { e.preventDefault(); saveStateToHistory(); document.execCommand(btn.dataset.cmd, false, btn.dataset.value || null); editor.focus(); }); });bindClick('asn-insert-table-btn', () => { saveStateToHistory(); const tableHtml = '
Header 1Header 2
Data 1Data 2


'; document.execCommand('insertHTML', false, tableHtml); showToast('Table inserted'); });bindClick('asn-insert-svg-btn', () => { saveStateToHistory(); const svgHtml = '
New AI Diagram Node


'; document.execCommand('insertHTML', false, svgHtml); showToast('Diagram inserted'); });const closeModal = () => { const m = document.getElementById('asn-modal-overlay'); if (m) m.style.display = 'none'; }; bindClick('asn-modal-close', closeModal); bindClick('asn-modal-dismiss-btn', closeModal);document.querySelectorAll('.asn-diag-action').forEach(btn => { if (btn.dataset.bound) return; btn.dataset.bound = 'true'; btn.addEventListener('click', (e) => { e.preventDefault(); if (!state.selectedDiagram) return; const action = btn.dataset.action; if (action === 'delete') { saveStateToHistory(); state.selectedDiagram.remove(); state.selectedDiagram = null; document.getElementById('asn-diagram-toolbar').style.display = 'none'; showToast('Diagram removed'); } else if (action === 'center') { state.selectedDiagram.style.textAlign = 'center'; showToast('Diagram centered'); } else if (action === 'copy') { navigator.clipboard.writeText(state.selectedDiagram.innerHTML); showToast('Diagram markup copied'); } else if (action === 'svg') { const blob = new Blob([state.selectedDiagram.innerHTML], { type: 'image/svg+xml;charset=utf-8' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = `diagram-${Date.now()}.svg`; a.click(); URL.revokeObjectURL(url); showToast('SVG Downloaded'); } }); });updateUndoRedoButtons(); }); })();