{"id":13432284,"url":"https://github.com/trainyard/choodown","last_synced_at":"2025-07-05T17:33:31.736Z","repository":{"id":86384451,"uuid":"63632084","full_name":"trainyard/choodown","owner":"trainyard","description":"A simple markdown component for choo-js","archived":false,"fork":false,"pushed_at":"2017-01-19T00:00:01.000Z","size":3,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-16T23:34:26.455Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/trainyard.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}},"created_at":"2016-07-18T19:45:51.000Z","updated_at":"2018-10-07T14:53:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9ae714e-c558-4433-b74d-c280a8485d6e","html_url":"https://github.com/trainyard/choodown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trainyard/choodown","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trainyard%2Fchoodown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trainyard%2Fchoodown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trainyard%2Fchoodown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trainyard%2Fchoodown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trainyard","download_url":"https://codeload.github.com/trainyard/choodown/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trainyard%2Fchoodown/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261304270,"owners_count":23138308,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-07-31T02:01:10.027Z","updated_at":"2025-06-22T14:20:36.905Z","avatar_url":"https://github.com/trainyard.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"[![built with choo v3](https://img.shields.io/badge/built%20with%20choo-v3-ffc3e4.svg?style=flat-square)](https://github.com/yoshuawuyts/choo)\n[![npm version](https://badge.fury.io/js/choodown.svg)](https://badge.fury.io/js/choodown)\n# Choodown\n\nA simple markdown/textarea component with ability to preview your changes.  Made for choo.\n\n## How to use:\n\n```\nnpm install choodown -S\n```\n\nAdd the following to your app model:\n\n```javascript\napp.model({\n  namespace: 'choodown',\n  state: {\n    text: '',\n    mode: 'EDIT'\n  },\n  reducers: {\n    updateText: (data, state) =\u003e ({text: data}),\n    toggleMode: (mode, state) =\u003e ({mode: state.mode === 'PREVIEW' ? 'EDIT' : 'PREVIEW'})\n  }\n});\n```\n\nAdd to your view like this:\n\n```javascript\nconst choodown = Choodown({\n  text: state.choodown.text,\n  mode: state.choodown.mode,\n  onChange: (e) =\u003e send('choodown:updateText', e.target.value),\n  onToggle: () =\u003e send('choodown:toggleMode')\n});\n\nreturn html`\n  \u003cmain\u003e\n    \u003ch1\u003eChoodown demo\u003c/h1\u003e\n    ${choodown}\n  \u003c/main\u003e`\n```\n\n## Example\n\nYou can see a full working example by cloning this repo:\n\n1. clone this repo\n2. run `npm install`\n3. run `npm start`\n4. go to `localhost:8080`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrainyard%2Fchoodown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrainyard%2Fchoodown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrainyard%2Fchoodown/lists"}