![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
draft-js-list-depth-plugin
Advanced tools
This is a plugin for the draft-js-plugins-editor
, a plugin system that sits on top of Draft.js.
When working with a list in DraftJS you can't decrease list depth level by pressing Return
on an empty list item, but you would expect it to behave this way because it is a common pattern for rich text editors.
This plugin adds this missing piece of functionality. Moreover, it also adds a Tab
/Shift + Tab
press support to move list item to the next depth level. So you don't need to worry about this anymore!
npm i --save draft-js-list-depth-plugin
then import the plugin creator function
import createListDepthPlugin from 'draft-js-list-depth-plugin'
const listDepthPlugin = createListDepthPlugin()
Plugin object can then be passed into a draft-js-plugins-editor
component:
import createListDepthPslugin from 'draft-js-list-depth-plugin'
import Editor from 'draft-js-plugins-editor'
const listDepthPlugin = createListDepthPlugin()
const plugins = [listDepthPlugin]
<Editor plugins={plugins} />
You can pass options object to the plugin as you call it:
const options = {
maxDepth: 4
}
const listDepthPlugin = createListDepthPlugin(options)
Option | Description | Default value | Required |
---|---|---|---|
maxDepth | The limit of the depth level for nested lists (zero-based numbering) | 4 | false |
FAQs
List depth Plugin for DraftJS
The npm package draft-js-list-depth-plugin receives a total of 24 weekly downloads. As such, draft-js-list-depth-plugin popularity was classified as not popular.
We found that draft-js-list-depth-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.