{"id":16540206,"url":"https://github.com/charliewilco/draft-as-markdown","last_synced_at":"2026-05-15T21:04:24.693Z","repository":{"id":75998527,"uuid":"104613844","full_name":"charliewilco/draft-as-markdown","owner":"charliewilco","description":null,"archived":false,"fork":false,"pushed_at":"2017-09-25T06:35:57.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-30T19:46:33.372Z","etag":null,"topics":["draft-js","markdown","microservice"],"latest_commit_sha":null,"homepage":"https://draft-to-markdown.now.sh/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/charliewilco.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-09-24T02:45:30.000Z","updated_at":"2023-02-04T20:43:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"e7aee2de-efcb-4097-a400-8d35bc3d3550","html_url":"https://github.com/charliewilco/draft-as-markdown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/charliewilco/draft-as-markdown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charliewilco%2Fdraft-as-markdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charliewilco%2Fdraft-as-markdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charliewilco%2Fdraft-as-markdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charliewilco%2Fdraft-as-markdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charliewilco","download_url":"https://codeload.github.com/charliewilco/draft-as-markdown/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charliewilco%2Fdraft-as-markdown/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33080379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["draft-js","markdown","microservice"],"created_at":"2024-10-11T18:51:49.793Z","updated_at":"2026-05-15T21:04:24.688Z","avatar_url":"https://github.com/charliewilco.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# draft-to-markdown\n\n`draft-to-markdown.now.sh/` is the micro service version of the really awesome [markdown-draft-js](https://github.com/Rosey/markdown-draft-js) module. Submitting a `POST` request to this endpoint will send back a stream of a blob of your `EditorState` as a formatted markdown file with simple front matter.\n\n## Usage\n\n**POST** __`/`__ render markdown text\n\n```javascript\n{\n    content: '\u003cRawContent\u003e', // from draft-js\n    title: '\u003cDocumentTitle\u003e' // string\n}\n```\n## Example\n\n```javascript\nimport { saveAs } from 'file-saver'\nimport { EditorState, convertToRaw } from 'draft-js'\n\nconst body = {\n  title: 'Something Detailed Post'\n  content: convertToRaw(EditorState.getCurrentContent())\n}\n\nconst exportMD = async (body: Object) =\u003e {\n  const res = await fetch('https://draft-to-markdown.now.sh/', {\n    method: 'POST',\n    headers: {\n      'Content-Type': 'application/json'\n    },\n    body: JSON.stringify(body)\n  })\n\n  const blob = await res.blob()\n\n  saveAs(blob, `${body.title.replace(/\\s+/g, '-').toLowerCase()}.md`)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharliewilco%2Fdraft-as-markdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharliewilco%2Fdraft-as-markdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharliewilco%2Fdraft-as-markdown/lists"}