Uso

Recursos

  • 手写 MD 解析器(无 marked.js 等 UMD 依赖)
  • 支持:H1-H6 / 粗斜体 / 代码块 / 链接 / 图片 / 列表 / 表格 / 任务列表 / 引用
  • 4 主题:GitHub / 极简 / 暗色 / 公众号
  • XSS 自动转义

Anwendungsfälle

  • 博客/公众号排版 / 文档生成 / 网页内容发布

Agent API Usage

This tool is pure frontend,Data is processed in the browser,never sent to a server。 manifest 中 api_url 为空,/api/markdown_to_html/ endpoint does not exist(返回 404)。 Agent 请读取 schema.json 理解字段,Please execute the tool logic in the browser first。
// Step 1: 读取工具 Schema
GET https://clawam.com/tools/markdown_to_html/schema.json

// Step 2: 在浏览器中执行工具逻辑
// MD 转换 在工具页 JS 中实现
'; showResult(body, '主题: ' + theme + ', ' + text.length + ' 字符 MD', true); } $('btn-main').addEventListener('click', function(e) { e.preventDefault(); doProcess(); }); $('btn-copy').addEventListener('click', function() { if (lastHtml && navigator.clipboard) navigator.clipboard.writeText(lastHtml); }); $('btn-download').addEventListener('click', function() { if (!lastHtml) return; var blob = new Blob([lastHtml], { type: 'text/html;charset=utf-8' }); var url = URL.createObjectURL(blob); var a = document.createElement('a'); a.href = url; a.download = 'markdown.html'; a.click(); URL.revokeObjectURL(url); }); $('btn-clear').addEventListener('click', function() { var inputs = document.querySelectorAll('input,textarea,select'); for (var i = 0; i < inputs.length; i++) { if (inputs[i].tagName === 'SELECT') inputs[i].selectedIndex = 0; else inputs[i].value = inputs[i].defaultValue; } lastHtml = ''; var ra = $('result-area'); ra.hidden = true; ra.style.display = 'none'; var em = $('error-msg'); em.hidden = true; em.style.display = 'none'; $('btn-copy').style.display = 'none'; $('btn-download').style.display = 'none'; }); })();