Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
draft-js-list-plugin
Advanced tools
Better lists for Draft.js
*
, 1.
or similar→ Demo
This plugin requires you to have draft-js-plugins
set up in your project.
Install the plugin using NPM:
npm install draft-js-list-plugin
Import the list plugin in your Editor component:
import React, { Component } from "react";
import PluginEditor from "draft-js-plugins-editor";
import createListPlugin from "draft-js-list-plugin";
// ...
const listPlugin = createListPlugin();
const plugins = [listPlugin];
export default class Editor extends Component {
// ...
render() {
const { editorState } = this.state;
return (
<PluginEditor
// ...
editorState={editorState}
plugins={plugins}
/>
);
}
}
See Editor.tsx for a full example.
You can pass options to the plugin the following way:
const listPlugin = createListPlugin({
// Your options
});
Supported options:
allowNestedLists
(boolean
): Whether the user should be able to create sublists (nested lists). Default: true
maxDepth
(number
): Allows you to control how deep the list nesting can be. Default: 4
olRegex
(RegExp
): Regular expression for determining whether a numbered list should be started. Default: /\d\./
ulChars
(string[]
): List of characters with which bullet lists can be started. Default: ["-", "–", "*"]
Requirements: Node.js, Yarn
git clone REPO_URL
yarn
yarn start
localhost:3000
Suggestions and contributions are always welcome! Please discuss larger changes via issue before submitting a pull request.
FAQs
Better lists for Draft.js
The npm package draft-js-list-plugin receives a total of 1,153 weekly downloads. As such, draft-js-list-plugin popularity was classified as popular.
We found that draft-js-list-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
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.