Markdown
Render a small safe subset of Markdown into semantic HTML.
Preview
Dispatch brief
Lighting led shipments. Prepare the next batch for Wednesday.
- Check
SL-204stock. - Reserve two packing stations.
HTML
<div class="rl-markdown-editor"><form class="rl-md-edit" action="/demo/insights/markdown" method="post" hx-post="/demo/insights/markdown" hx-target="next .rl-md-output" hx-swap="innerHTML" hx-sync="this:replace"><label>Markdown source<textarea class="rl-input" name="source" rows="6" maxlength="4000" spellcheck="false"># Dispatch brief
**Lighting** led shipments. Prepare the next batch for Wednesday.
- Check `SL-204` stock.
- Reserve two packing stations.</textarea></label><div class="rl-md-actions"><button class="rl-button rl-button-secondary rl-button-sm">Render preview</button><span class="rl-insight-status" data-rl-report-status role="status"></span></div></form><section class="rl-md-preview" aria-label="Rendered preview"><h2>Preview</h2><div class="rl-md-output"><div class="rl-markdown"><h3>Dispatch brief</h3>
<p><strong>Lighting</strong> led shipments. Prepare the next batch for Wednesday.</p>
<ul><li>Check <code>SL-204</code> stock.</li><li>Reserve two packing stations.</li></ul></div></div></section></div>HTTP exchange
Use the preview to see the request and the HTML your server returns.The optional insight-markdown.mjs server helper supports paragraphs, headings, unordered lists, strong, emphasis, inline code and fenced code. Raw markup is escaped.
Use in your app
Copy these tags into your page head once. Serve the files at the paths shown, then add the example’s template to your page.
Page assets
<link rel="stylesheet" href="/mero.css">
<link rel="stylesheet" href="/mero-insights.css">
<script defer src="/vendor/htmx.min.js"></script>
<script defer src="/mero.js"></script>
<script defer src="/mero-insights.js"></script>Point the HTMX attributes at your own HTML endpoints. Use the live preview’s HTTP exchange to inspect the request and response.
Optional server helper · insight-markdown.mjs ↓
Download library and examples ↓