https://github.com/sugarshin/draft-js-checkable-list-plugin
Checkable list plugin for Draft.js
https://github.com/sugarshin/draft-js-checkable-list-plugin
draft-js draft-js-plugins react
Last synced: 9 months ago
JSON representation
Checkable list plugin for Draft.js
- Host: GitHub
- URL: https://github.com/sugarshin/draft-js-checkable-list-plugin
- Owner: sugarshin
- Created: 2016-12-12T13:40:42.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-05-23T07:00:50.000Z (almost 8 years ago)
- Last Synced: 2025-06-29T20:17:12.551Z (10 months ago)
- Topics: draft-js, draft-js-plugins, react
- Language: JavaScript
- Homepage: https://sugarshin.github.io/draft-js-checkable-list-plugin/
- Size: 781 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# draft-js-checkable-list-plugin
[![CircleCI][circleci-image]][circleci-url]
[![Coverage Status][coveralls-image]][coveralls-url]
[![npm version][npm-image]][npm-url]
[![License][license-image]][license-url]
Checkable list item plugin for the [draft-js-plugins-editor](https://github.com/draft-js-plugins/draft-js-plugins) .
```sh
yarn add draft-js-checkable-list-plugin
```
[Live demo](https://sugarshin.github.io/draft-js-checkable-list-plugin/)
## Usage
Example
```js
import React, { Component } from 'react'
import { EditorState } from 'draft-js'
import Editor from 'draft-js-plugins-editor'
import createCheckableListPlugin from 'draft-js-checkable-list-plugin'
import 'draft-js-checkable-list-plugin/lib/plugin.css'
const checkableListPlugin = createCheckableListPlugin()
const plugins = [checkableListPlugin]
class App extends Component {
state = { editorState: EditorState.createEmpty() }
onChange = editorState => this.setState({ editorState })
render() {
return (
)
}
}
```
## License
[MIT][license-url]
© sugarshin
[circleci-image]: https://circleci.com/gh/sugarshin/draft-js-checkable-list-plugin/tree/master.svg?style=svg&circle-token=d416d2a32786c1e139bac37cf6864b310b1da172
[circleci-url]: https://circleci.com/gh/sugarshin/draft-js-checkable-list-plugin/tree/master
[coveralls-image]: https://coveralls.io/repos/github/sugarshin/draft-js-checkable-list-plugin/badge.svg?branch=master
[coveralls-url]: https://coveralls.io/github/sugarshin/draft-js-checkable-list-plugin?branch=master
[npm-image]: https://img.shields.io/npm/v/draft-js-checkable-list-plugin.svg?style=flat-square
[npm-url]: https://www.npmjs.org/package/draft-js-checkable-list-plugin
[license-image]: https://img.shields.io/:license-mit-blue.svg?style=flat-square
[license-url]: https://sugarshin.mit-license.org/