New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

draft-js-multiline-list-item-plugin

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

draft-js-multiline-list-item-plugin

Multiline list item Plugin for DraftJS

1.0.2
latest
Source
npm
Version published
Weekly downloads
24
14.29%
Maintainers
1
Weekly downloads
 
Created
Source

Draft.js MultiLine List Item plugin

This is a plugin for the draft-js-plugins-editor, a plugin system that sits on top of Draft.js.

By default DraftJS doesn't allow you to have multiline items in lists - when you press Shift+Return it still adds a new list item.

This plugin adds behaviour to the editor to stay on the same list item and include a so called 'soft newline' into the list item on Shift+Return press.

Usage

npm i --save draft-js-multiline-list-item-plugin

then import the plugin creator function

import createMultilineListItemPlugin from 'draft-js-multiline-list-item-plugin'
const multiLineListItemPlugin = createMultilineListItemPlugin()

This can then be passed into a draft-js-plugins-editor component:

import createMultilineListItemPlugin from 'draft-js-multiline-list-item-plugin'
import Editor from 'draft-js-plugins-editor'

const multiLineListItemPlugin = createMultilineListItemPlugin()
const plugins = [multiLineListItemPlugin]

<Editor plugins={plugins} />

Keywords

editor

FAQs

Package last updated on 20 Aug 2018

Did you know?

Socket

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