Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dbtek/choo-md-editor
Markdown Editor built with Choo / for Choo.
https://github.com/dbtek/choo-md-editor
Last synced: about 2 months ago
JSON representation
Markdown Editor built with Choo / for Choo.
- Host: GitHub
- URL: https://github.com/dbtek/choo-md-editor
- Owner: dbtek
- License: mit
- Created: 2016-12-21T13:35:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2017-07-17T04:58:58.000Z (over 7 years ago)
- Last Synced: 2024-11-07T10:41:04.832Z (2 months ago)
- Language: JavaScript
- Homepage: https://dbtek.github.io/choo-md-editor
- Size: 296 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-choo - choo-md-editor - Lightweight markdown editor that can be used inside Choo app or as a standalone library. (Uncategorized / Uncategorized)
README
Choo Markdown Editor [![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
===Markdown Editor built with Choo / for Choo. It can be used inside a Choo app or as a standalone library.
![screenshot](ss.png)
### Install
```bash
$ npm i -S choo-md-editor
```### Usage
choo-md-editor depends on some parts of Bulma styles. If you use Bulma in your project use `choo-md-editor.bulma.css` instead of whole `choo-md-editor.css`.Material Icons are being used please include it's css too.
```html
```
#### Standalone Library
```js
const element = document.getElementById('editor-container')
const editor = require('choo-md-editor')
editor(element, {onChange: (val) => console.info('Markdown changed', val)})
```#### Inside choo app
```js
app = choo()
...
app.model(require('choo-md-editor/model'))
...
const editor = require('choo-md-editor/component')
const mainView = (state, prev, send) => {
html `
$editor(state, send)
`
}
```### Credits
- [Choo Framework](https://github.com/yoshuawuyts/choo)
- [Bulma CSS Framework](http://bulma.io)
- [Marked](https://github.com/chjj/marked)### Author
İsmail Demirbilek [@dbtek](https://twitter.com/dbtek)