KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
choodown
★ 14
Open GitHub ↗
A simple markdown component for choo-js
Download README (.md)
Explore Similar Repositories
CCCountDownButton
:
CountDownButton, The button to get VerifyCode(倒计时按钮,用于获取验证码)
BinderPoolDemo
:
实现AIDL接口的Binder连接池
opencore-vo-amrwbenc-iOS
:
AMR build vo-amrwbenc iOS
MLexp
:
This Contains Algorithms and codes for NLP, CV and deep learning basics and some advanced concepts
testVoice
:
讯飞语音识别集成demo
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
choodown
?
Download (.md)
[](https://github.com/yoshuawuyts/choo) [](https://badge.fury.io/js/choodown) # 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`