theboringtools
Markdown
Words: 0
Chars: 0
Lines: 0
Read: 0 min
Ln 1, Col 1
Markdown 0 chars
Preview 0%
Keyboard Shortcuts
Bold
CmdB
Italic
CmdI
Inline code
CmdE
Copy markdown
CmdShiftC
Copy HTML
CmdShiftH
Download .md
CmdS
Toggle preview
CmdP
Tab (indent)
Tab
This panel
?
`; const blob = new Blob([html], { type: 'text/html' }); const a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = 'document.html'; a.click(); showToast('Downloading document.html'); } // ── Resize handle ───────────────────────────────────────────── const handle = document.getElementById('resizeHandle'); const mainArea = document.getElementById('mainArea'); let isResizing = false, startX = 0, startW = 0; handle.addEventListener('mousedown', e => { isResizing = true; startX = e.clientX; startW = document.getElementById('editorPane').offsetWidth; document.body.style.cursor = 'col-resize'; document.body.style.userSelect = 'none'; }); document.addEventListener('mousemove', e => { if (!isResizing) return; const dx = e.clientX - startX; const totalW = mainArea.offsetWidth; const newW = Math.max(200, Math.min(startW + dx, totalW - 200)); document.getElementById('editorPane').style.width = newW + 'px'; document.getElementById('editorPane').style.flex = 'none'; }); document.addEventListener('mouseup', () => { if (isResizing) { isResizing = false; document.body.style.cursor = ''; document.body.style.userSelect = ''; } }); // ── Shortcuts panel ─────────────────────────────────────────── function showShortcuts() { document.getElementById('shortcutsOverlay').classList.add('show'); } function hideShortcuts() { document.getElementById('shortcutsOverlay').classList.remove('show'); } document.addEventListener('keydown', e => { if (e.key === 'Escape') hideShortcuts(); }); // ── Toast ───────────────────────────────────────────────────── function showToast(msg) { const t = document.getElementById('toast'); t.textContent = msg; t.classList.add('show'); setTimeout(() => t.classList.remove('show'), 2200); } // ── Init ────────────────────────────────────────────────────── init();