Socket
Socket
Sign inDemoInstall

draft-js-checkable-list-plugin

Package Overview
Dependencies
29
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    draft-js-checkable-list-plugin

Checkable list plugin for DraftJS


Version published
Maintainers
1
Install size
4.27 MB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 23 May 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc