📝
Markdown
📄
HTML
📃
Plain Text
💻
Code

    ${title.replace(/${author ? 'By ' + author.replace(/' : ''}
    ${body} `; } function openPrint() { const html = buildPrintHtml(); const frame = document.getElementById('printFrame'); const doc = frame.contentDocument || frame.contentWindow.document; doc.open(); doc.write(html); doc.close(); setTimeout(() => { frame.contentWindow.focus(); frame.contentWindow.print(); }, 350); } $('#saveBtn').addEventListener('click', () => { showToast('💡 ' + t('save')); openPrint(); }); $('#printBtn').addEventListener('click', openPrint); // Init $('#m-md').textContent = t('m_md'); $('#m-html').textContent = t('m_html'); $('#m-txt').textContent = t('m_txt'); $('#m-code').textContent = t('m_code'); $('#lblPage').textContent = t('page'); $('#lblOrient').textContent = t('orient'); $('#lblFont').textContent = t('fontSize'); $('#lblTitle').textContent = t('title'); $('#lblAuthor').textContent = t('author'); $('#lblTheme').textContent = t('theme'); $('#lblSrc').textContent = t('source'); $('#lblSave').textContent = t('save'); $('#lblPrint').textContent = t('print'); $('#lblExample').textContent = t('example'); $('#lblClear').textContent = t('clear'); $('#source').value = examples.markdown; render(); GZ.renderToolPage({ category: 'convert', titleKey: 'toolTitle', descKey: 'toolDesc', howToSteps: ['step1','step2','step3','step4'], related: [ {icon:'📄', href:'/convert/pdf-merger.html', name:'PDF Merger'}, {icon:'✂️', href:'/convert/pdf-page-splitter.html', name:'PDF Page Splitter'}, {icon:'🖼️', href:'/convert/pdf-to-image.html', name:'PDF to Image'}, {icon:'📋', href:'/text/markdown-to-html.html', name:'Markdown to HTML'}, ] });