Suporta: títulos, negrito, itálico, links, listas, código, citações e mais.
`); iframeDoc.close(); // Show results resultsSection.hidden = false; copyHtmlBtn.disabled = false; setButtonLoading(false); // Success notification UIkit.notification({ message: ' Markdown convertido com sucesso!', status: 'success', pos: 'top-center', timeout: 2000 }); // Scroll to results resultsSection.scrollIntoView({ behavior: 'smooth', block: 'start' }); }, 100); } catch (error) { setButtonLoading(false); showError('Erro ao converter Markdown: ' + error.message); } } /** * Clear all inputs and outputs */ function clearAll() { markdownInput.value = ''; lastHtmlOutput = ''; resultsSection.hidden = true; hideError(); copyHtmlBtn.disabled = true; markdownInput.focus(); UIkit.notification({ message: ' Editor limpo!', status: 'primary', pos: 'top-center', timeout: 1500 }); } /** * Copy HTML to clipboard */ function copyHtml() { if (!lastHtmlOutput) { return; } navigator.clipboard.writeText(lastHtmlOutput).then(() => { UIkit.notification({ message: ' HTML copiado para a área de transferência!', status: 'success', pos: 'top-center', timeout: 2000 }); }).catch(() => { UIkit.notification({ message: ' Erro ao copiar. Tente novamente.', status: 'danger', pos: 'top-center', timeout: 3000 }); }); } /** * Handle keyboard shortcuts */ function handleKeyboard(e) { // Ctrl/Cmd + Enter to convert if ((e.ctrlKey || e.metaKey) && e.key === 'Enter') { e.preventDefault(); convertMarkdown(); } } // Event Listeners convertBtn.addEventListener('click', convertMarkdown); clearBtn.addEventListener('click', clearAll); copyHtmlBtn.addEventListener('click', copyHtml); markdownInput.addEventListener('keydown', handleKeyboard); // Auto-resize iframe height based on content previewFrame.addEventListener('load', function() { try { const doc = previewFrame.contentDocument || previewFrame.contentWindow.document; const height = Math.min(doc.body.scrollHeight, 500); previewFrame.style.height = height + 'px'; } catch (e) { // Ignore cross-origin errors } }); })();

Sobre esta ferramenta

Ferramenta que converte texto em Markdown em HTML.
Feito com Parsedown


Markdown to HTML — PedroPaulo.net

Markdown to HTML

Suporta: títulos, negrito, itálico, links, listas, código, citações e mais.