DEV Community

Discussion on: How to view the raw markdown of a dev.to post

Collapse
 
lionelrowe profile image
lionel-rowe

One-liner version

console.log((await (await fetch(((url) => (Object.assign(url, { pathname: `/api/articles${url.pathname}` })))(new URL(window.location.href)).href)).json()).body_markdown)
Enter fullscreen mode Exit fullscreen mode