A esm-native library that converts HTML to Markdown & Useful Utilities with simple, lightweight and epic quality.
Head to the documentation to read and learn more about Webforai.
npx webforai@latest
or
import { htmlToMarkdown, htmlToMdast } from "webforai";
import { loadHtml } from "webforai/loaders/playwright";
// Load html from url
const url = "https://www.npmjs.com/package/webforai";
const html = await loadHtml(url);
// Convert html to markdown
const markdown = htmlToMarkdown(html, { baseUrl: url });
Apache 2.0 License