drafto
v0.0.2
Published
A draftjs implementation by ClassApp
Downloads
1
Readme
#drafto
How to use it?
Install drafto into your project using:
npm i -S drafto && npm install
or (Recommended)
yarn add drafto && yarn
Then you can import Drafto component inside your js:
...
import Drafto from 'drafto';
...
<Drafto
placeholder={'Write the message here'}
onChange={content => console.log(content)}
hyperlinkPlaceholder={'Insert link and press Enter'}
/>
...
###Roadmap
- [x] Extract css styles with webpack
- [x] Add font awesome as primary icon font
- [ ] Table (Waiting a new plugin from draft-js-plugins)
- [ ] Create an example
- [ ] Improve develop workflow
- [ ] Improve alignment selector. If an alignment style have been already applied in editor and user wants to change it we must remove the last one and then apply the other
- [x] Publish Drafto in NPM
###Developing
Clone Drafto and run:
yarn && yarn run build && yarn link
In your project folder you do:
yarn link drafto
After that, just import in your code:
...
import Drafto from 'drafto';
...
<Drafto
placeholder={'Write the message here'}
onChange={content => console.log(content)}
hyperlinkPlaceholder={'Insert link and press Enter'}
/>...
###Contributing
PR are welcome :)
Feel free to implement your ideas \o/