# choodown

> A simple markdown component for choo-js

Latest version **0.0.1** (published 2016-07-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install choodown
pnpm add choodown
yarn add choodown
bun add choodown
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2016-07-18 |
| First published | 2016-07-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mattmcfarland |
| Keywords | markdown, choo, choo-component |

## Links

- npm: https://www.npmjs.com/package/choodown
- npm.io page: https://npm.io/package/choodown

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2016-07-18

## README

# Choodown

A simple markdown/textarea component with ability to preview your changes.  Made for choo.

## How to use:

```
npm install choodown -S
```

Add the following to your app model:

```javascript
app.model({
  namespace: 'choodown',
  state: {
    text: '',
    mode: 'EDIT'
  },
  reducers: {
    updateText: (data, state) => ({text: data}),
    toggleMode: (mode, state) => ({mode: state.mode === 'PREVIEW' ? 'EDIT' : 'PREVIEW'})
  }
});
```

Add to your view like this:

```javascript
const choodown = Choodown({
  text: state.choodown.text,
  mode: state.choodown.mode,
  onChange: (e) => send('choodown:updateText', e.target.value),
  onToggle: () => send('choodown:toggleMode')
});

return html`
  <main>
    <h1>Choodown demo</h1>
    ${choodown}
  </main>`
```

## Example

You can see a full working example by cloning this repo:
1. clone this repo
2. run `npm install`
3. run `npm start`
4. go to `localhost:8080`

---
_Source: https://npm.io/package/choodown · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
