Skip to content

sugarshin/draft-js-checkable-list-plugin

Repository files navigation

draft-js-checkable-list-plugin

CircleCI Coverage Status

npm version License

Checkable list item plugin for the draft-js-plugins-editor .

yarn add draft-js-checkable-list-plugin

Live demo

Usage

Example

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 (
      <div>
        <Editor
          editorState={this.state.editorState}
          plugins={plugins}
          onChange={this.onChange}
        />
      </div>
    )
  }
}

License

MIT

© sugarshin

About

Checkable list plugin for Draft.js

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy