# @demoflow/nested-list

> Nested list Tool for EditorJS

Latest version **1.0.2** (published 2021-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install @demoflow/nested-list
pnpm add @demoflow/nested-list
yarn add @demoflow/nested-list
bun add @demoflow/nested-list
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-11-05 |
| First published | 2021-11-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 198 |
| Unpacked size | 170.2 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 76 |
| Author | CodeX |
| Maintainers | augustooody, lilbitner, gustavocig, seth_demoflow, jake.mosher, jackdemoflow |

## Links

- npm: https://www.npmjs.com/package/@demoflow/nested-list
- Repository: https://github.com/editor-js/nested-list
- Homepage: https://github.com/editor-js/nested-list#readme
- Issues: https://github.com/editor-js/nested-list/issues
- npm.io page: https://npm.io/package/@demoflow/nested-list

## Dependencies (198)

- [ms](https://npm.io/package/ms.md) ^2.1.2
- [ajv](https://npm.io/package/ajv.md) ^6.12.6
- [has](https://npm.io/package/has.md) ^1.0.3
- [glob](https://npm.io/package/glob.md) ^7.1.6
- [levn](https://npm.io/package/levn.md) ^0.4.1
- [once](https://npm.io/package/once.md) ^1.4.0
- [uniq](https://npm.io/package/uniq.md) ^1.0.1
- [yaml](https://npm.io/package/yaml.md) ^1.10.2
- [acorn](https://npm.io/package/acorn.md) ^7.4.1
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [debug](https://npm.io/package/debug.md) ^4.3.1
- [execa](https://npm.io/package/execa.md) ^5.0.0
- [isexe](https://npm.io/package/isexe.md) ^2.0.0
- [json5](https://npm.io/package/json5.md) ^2.2.0
- [klona](https://npm.io/package/klona.md) ^2.0.4
- [p-try](https://npm.io/package/p-try.md) ^2.2.0
- [table](https://npm.io/package/table.md) ^6.0.7
- [tslib](https://npm.io/package/tslib.md) ^1.14.1
- [which](https://npm.io/package/which.md) ^2.0.2
- [big.js](https://npm.io/package/big.js.md) ^5.2.2
- [cssesc](https://npm.io/package/cssesc.md) ^3.0.0
- [espree](https://npm.io/package/espree.md) ^7.3.1
- [events](https://npm.io/package/events.md) ^3.3.0
- [ignore](https://npm.io/package/ignore.md) ^4.0.6
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [nanoid](https://npm.io/package/nanoid.md) ^3.1.22
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [semver](https://npm.io/package/semver.md) ^7.3.5
- [terser](https://npm.io/package/terser.md) ^5.6.1
- [uri-js](https://npm.io/package/uri-js.md) ^4.4.1
- [wrappy](https://npm.io/package/wrappy.md) ^1.0.2
- [deep-is](https://npm.io/package/deep-is.md) ^0.1.3
- [envinfo](https://npm.io/package/envinfo.md) ^7.7.4
- [esprima](https://npm.io/package/esprima.md) ^4.0.1
- [esquery](https://npm.io/package/esquery.md) ^1.4.0
- [esutils](https://npm.io/package/esutils.md) ^2.0.3
- [find-up](https://npm.io/package/find-up.md) ^4.1.0
- [flatted](https://npm.io/package/flatted.md) ^3.1.1
- [globals](https://npm.io/package/globals.md) ^13.7.0
- [is-glob](https://npm.io/package/is-glob.md) ^4.0.1
- [js-yaml](https://npm.io/package/js-yaml.md) ^3.14.1
- [kind-of](https://npm.io/package/kind-of.md) ^6.0.3
- [mime-db](https://npm.io/package/mime-db.md) ^1.46.0
- [onetime](https://npm.io/package/onetime.md) ^5.1.2
- [p-limit](https://npm.io/package/p-limit.md) ^3.1.0
- [pkg-dir](https://npm.io/package/pkg-dir.md) ^4.2.0
- [rechoir](https://npm.io/package/rechoir.md) ^0.7.0
- [regexpp](https://npm.io/package/regexpp.md) ^3.1.0
- [resolve](https://npm.io/package/resolve.md) ^1.20.0
- [tapable](https://npm.io/package/tapable.md) ^2.2.0
- [yallist](https://npm.io/package/yallist.md) ^4.0.0
- [argparse](https://npm.io/package/argparse.md) ^1.0.10
- [doctrine](https://npm.io/package/doctrine.md) ^3.0.0
- [enquirer](https://npm.io/package/enquirer.md) ^2.3.6
- [error-ex](https://npm.io/package/error-ex.md) ^1.3.2
- [escalade](https://npm.io/package/escalade.md) ^3.1.1
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1.0
- [has-flag](https://npm.io/package/has-flag.md) ^3.0.0
- [inflight](https://npm.io/package/inflight.md) ^1.0.6
- [inherits](https://npm.io/package/inherits.md) ^2.0.4
- [isobject](https://npm.io/package/isobject.md) ^3.0.1
- [jsonfile](https://npm.io/package/jsonfile.md) ^4.0.0
- [make-dir](https://npm.io/package/make-dir.md) ^3.1.0
- [mimic-fn](https://npm.io/package/mimic-fn.md) ^2.1.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.5
- [p-locate](https://npm.io/package/p-locate.md) ^4.1.0
- [path-key](https://npm.io/package/path-key.md) ^3.1.1
- [progress](https://npm.io/package/progress.md) ^2.0.3
- [punycode](https://npm.io/package/punycode.md) ^2.1.1
- [wildcard](https://npm.io/package/wildcard.md) ^2.0.0
- [acorn-jsx](https://npm.io/package/acorn-jsx.md) ^5.3.1
- [callsites](https://npm.io/package/callsites.md) ^3.1.0
- [camelcase](https://npm.io/package/camelcase.md) ^6.2.0
- [colorette](https://npm.io/package/colorette.md) ^1.2.2
- [commander](https://npm.io/package/commander.md) ^7.2.0
- [commondir](https://npm.io/package/commondir.md) ^1.0.1
- [esrecurse](https://npm.io/package/esrecurse.md) ^4.3.0
- [interpret](https://npm.io/package/interpret.md) ^2.2.0
- [is-stream](https://npm.io/package/is-stream.md) ^2.0.0
- [js-tokens](https://npm.io/package/js-tokens.md) ^4.0.0
- [lru-cache](https://npm.io/package/lru-cache.md) ^6.0.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.4
- [neo-async](https://npm.io/package/neo-async.md) ^2.6.2
- [path-type](https://npm.io/package/path-type.md) ^4.0.0
- [type-fest](https://npm.io/package/type-fest.md) ^0.20.2
- [watchpack](https://npm.io/package/watchpack.md) ^2.1.1
- [word-wrap](https://npm.io/package/word-wrap.md) ^1.2.3
- [ansi-regex](https://npm.io/package/ansi-regex.md) ^5.0.0
- [clone-deep](https://npm.io/package/clone-deep.md) ^4.0.1
- [color-name](https://npm.io/package/color-name.md) ^1.1.4
- [concat-map](https://npm.io/package/concat-map.md) ^0.0.1
- [estraverse](https://npm.io/package/estraverse.md) ^5.2.0
- [flat-cache](https://npm.io/package/flat-cache.md) ^3.0.4
- [get-stream](https://npm.io/package/get-stream.md) ^6.0.0
- [icss-utils](https://npm.io/package/icss-utils.md) ^5.1.0
- [indexes-of](https://npm.io/package/indexes-of.md) ^1.0.1
- [is-extglob](https://npm.io/package/is-extglob.md) ^2.1.1
- [mime-types](https://npm.io/package/mime-types.md) ^2.1.29
- [optionator](https://npm.io/package/optionator.md) ^0.9.1
- [parse-json](https://npm.io/package/parse-json.md) ^5.2.0
- [path-parse](https://npm.io/package/path-parse.md) ^1.0.6
- [prelude-ls](https://npm.io/package/prelude-ls.md) ^1.2.1
- [slice-ansi](https://npm.io/package/slice-ansi.md) ^4.0.0
- [source-map](https://npm.io/package/source-map.md) ^0.6.1
- [sprintf-js](https://npm.io/package/sprintf-js.md) ^1.0.3
- [strip-ansi](https://npm.io/package/strip-ansi.md) ^6.0.0
- [text-table](https://npm.io/package/text-table.md) ^0.2.0
- [type-check](https://npm.io/package/type-check.md) ^0.4.0
- [ansi-colors](https://npm.io/package/ansi-colors.md) ^4.1.1
- [ansi-styles](https://npm.io/package/ansi-styles.md) ^4.3.0
- [buffer-from](https://npm.io/package/buffer-from.md) ^1.1.1
- [cosmiconfig](https://npm.io/package/cosmiconfig.md) ^7.0.0
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^7.0.3
- [emoji-regex](https://npm.io/package/emoji-regex.md) ^8.0.0
- [emojis-list](https://npm.io/package/emojis-list.md) ^3.0.0
- [fs.realpath](https://npm.io/package/fs.realpath.md) ^1.0.0
- [glob-parent](https://npm.io/package/glob-parent.md) ^5.1.2
- [graceful-fs](https://npm.io/package/graceful-fs.md) ^4.2.6
- [imurmurhash](https://npm.io/package/imurmurhash.md) ^0.1.4
- [is-arrayish](https://npm.io/package/is-arrayish.md) ^0.2.1
- [jest-worker](https://npm.io/package/jest-worker.md) ^26.6.2
- [locate-path](https://npm.io/package/locate-path.md) ^5.0.0
- [object-hash](https://npm.io/package/object-hash.md) ^2.1.1
- [path-exists](https://npm.io/package/path-exists.md) ^4.0.0
- [randombytes](https://npm.io/package/randombytes.md) ^2.1.0
- [resolve-cwd](https://npm.io/package/resolve-cwd.md) ^3.0.0
- [safe-buffer](https://npm.io/package/safe-buffer.md) ^5.2.1
- [signal-exit](https://npm.io/package/signal-exit.md) ^3.0.3
- [yocto-queue](https://npm.io/package/yocto-queue.md) ^0.1.0
- [ajv-keywords](https://npm.io/package/ajv-keywords.md) ^3.5.2
- [astral-regex](https://npm.io/package/astral-regex.md) ^2.0.0
- [browserslist](https://npm.io/package/browserslist.md) ^4.16.3
- [caniuse-lite](https://npm.io/package/caniuse-lite.md) ^1.0.30001204
- [eslint-scope](https://npm.io/package/eslint-scope.md) ^5.1.1
- [eslint-utils](https://npm.io/package/eslint-utils.md) ^2.1.0
- [import-fresh](https://npm.io/package/import-fresh.md) ^3.3.0
- [import-local](https://npm.io/package/import-local.md) ^3.0.2
- [loader-utils](https://npm.io/package/loader-utils.md) ^2.0.0
- [merge-stream](https://npm.io/package/merge-stream.md) ^2.0.0
- [npm-run-path](https://npm.io/package/npm-run-path.md) ^4.0.1
- [resolve-from](https://npm.io/package/resolve-from.md) ^4.0.0
- [schema-utils](https://npm.io/package/schema-utils.md) ^3.0.0
- [string-width](https://npm.io/package/string-width.md) ^4.2.2
- [universalify](https://npm.io/package/universalify.md) ^0.1.2
- [color-convert](https://npm.io/package/color-convert.md) ^2.0.1
- [function-bind](https://npm.io/package/function-bind.md) ^1.1.1
- [human-signals](https://npm.io/package/human-signals.md) ^2.1.0
- [loader-runner](https://npm.io/package/loader-runner.md) ^4.2.0
- [node-releases](https://npm.io/package/node-releases.md) ^1.1.71
- [parent-module](https://npm.io/package/parent-module.md) ^1.0.1
- [shallow-clone](https://npm.io/package/shallow-clone.md) ^3.0.1
- [shebang-regex](https://npm.io/package/shebang-regex.md) ^3.0.0
- [webpack-merge](https://npm.io/package/webpack-merge.md) ^5.7.3
- [balanced-match](https://npm.io/package/balanced-match.md) ^1.0.0
- [find-cache-dir](https://npm.io/package/find-cache-dir.md) ^3.3.1
- [glob-to-regexp](https://npm.io/package/glob-to-regexp.md) ^0.4.1
- [is-core-module](https://npm.io/package/is-core-module.md) ^2.2.0
- [supports-color](https://npm.io/package/supports-color.md) ^5.5.0
- [util-deprecate](https://npm.io/package/util-deprecate.md) ^1.0.2
- [brace-expansion](https://npm.io/package/brace-expansion.md) ^1.1.11
- [es-module-lexer](https://npm.io/package/es-module-lexer.md) ^0.4.1
- [fast-deep-equal](https://npm.io/package/fast-deep-equal.md) ^3.1.3
- [is-plain-object](https://npm.io/package/is-plain-object.md) ^2.0.4
- [natural-compare](https://npm.io/package/natural-compare.md) ^1.4.0
- [shebang-command](https://npm.io/package/shebang-command.md) ^2.0.0
- [source-list-map](https://npm.io/package/source-list-map.md) ^2.0.1
- [webpack-sources](https://npm.io/package/webpack-sources.md) ^2.2.0
- [enhanced-resolve](https://npm.io/package/enhanced-resolve.md) ^5.7.0
- [fast-levenshtein](https://npm.io/package/fast-levenshtein.md) ^2.0.6
- [file-entry-cache](https://npm.io/package/file-entry-cache.md) ^6.0.1
- [path-is-absolute](https://npm.io/package/path-is-absolute.md) ^1.0.1
- [v8-compile-cache](https://npm.io/package/v8-compile-cache.md) ^2.3.0
- [lines-and-columns](https://npm.io/package/lines-and-columns.md) ^1.1.6
- [chrome-trace-event](https://npm.io/package/chrome-trace-event.md) ^1.0.2
- [source-map-support](https://npm.io/package/source-map-support.md) ^0.5.19
- [eslint-visitor-keys](https://npm.io/package/eslint-visitor-keys.md) ^1.3.0
- [fastest-levenshtein](https://npm.io/package/fastest-levenshtein.md) ^1.0.12
- [require-from-string](https://npm.io/package/require-from-string.md) ^2.0.2
- [strip-final-newline](https://npm.io/package/strip-final-newline.md) ^2.0.0
- [strip-json-comments](https://npm.io/package/strip-json-comments.md) ^3.1.1
- [electron-to-chromium](https://npm.io/package/electron-to-chromium.md) ^1.3.699
- [escape-string-regexp](https://npm.io/package/escape-string-regexp.md) ^1.0.5
- [json-schema-traverse](https://npm.io/package/json-schema-traverse.md) ^0.4.1
- [postcss-value-parser](https://npm.io/package/postcss-value-parser.md) ^4.1.0
- [serialize-javascript](https://npm.io/package/serialize-javascript.md) ^5.0.1
- [postcss-modules-scope](https://npm.io/package/postcss-modules-scope.md) ^3.0.0
- [terser-webpack-plugin](https://npm.io/package/terser-webpack-plugin.md) ^5.1.1
- [postcss-modules-values](https://npm.io/package/postcss-modules-values.md) ^4.0.0
- [is-fullwidth-code-point](https://npm.io/package/is-fullwidth-code-point.md) ^3.0.0
- [postcss-selector-parser](https://npm.io/package/postcss-selector-parser.md) ^6.0.4
- [json-parse-better-errors](https://npm.io/package/json-parse-better-errors.md) ^1.0.2
- [functional-red-black-tree](https://npm.io/package/functional-red-black-tree.md) ^1.0.1
- [fast-json-stable-stringify](https://npm.io/package/fast-json-stable-stringify.md) ^2.1.0
- [json-parse-even-better-errors](https://npm.io/package/json-parse-even-better-errors.md) ^2.3.1
- [postcss-modules-extract-imports](https://npm.io/package/postcss-modules-extract-imports.md) ^3.0.0
- [postcss-resolve-nested-selector](https://npm.io/package/postcss-resolve-nested-selector.md) ^0.1.1
- [postcss-modules-local-by-default](https://npm.io/package/postcss-modules-local-by-default.md) ^4.0.0
- [json-stable-stringify-without-jsonify](https://npm.io/package/json-stable-stringify-without-jsonify.md) ^1.0.1

## Recent versions

- 1.0.2 (latest) — 2021-11-05
- 1.0.1 — 2021-11-04
- 1.0.1-jm — 2021-11-04
- 1.0.0 — 2021-11-02

## README

![](https://badgen.net/badge/Editor.js/v2.19.2/blue)

# Nested List Tool for Editor.js

Multi-leveled lists for the [Editor.js](https://editorjs.io).

Use `Tab` and `Shift+Tab` keys to create or remove sublist with a padding.

![](assets/example.gif)

## Installation

### Install via NPM

Get the package

```shell
npm i --save @editorjs/nested-list
```

Or

```shell
yarn add @editorjs/nested-list
```

Include module at your application

```javascript
import NestedList from "@editorjs/nested-list";
```

### Load from CDN

Load the script from [jsDelivr CDN](https://www.jsdelivr.com/package/npm/@editorjs/nested-list) and connect to your page.

```html
<script src="https://cdn.jsdelivr.net/npm/@editorjs/nested-list@latest"></script>
```

## Usage

Add the NestedList Tool to the `tools` property of the Editor.js initial config.

```javascript
import EditorJS from '@editorjs/editorjs';
import NestedList from '@editorjs/nested-list';

var editor = EditorJS({
  // ...
  tools: {
    ...
    list: {
      class: NestedList,
      inlineToolbar: true,
    },
  },
});
```

## Config Params

| Field            | Type     | Description                                    |
| ---------------- | -------- | ---------------------------------------------- |
| defaultListStyle | `string` | type of default list: `ordered` or `unordered` |

## Tool's settings

![](https://capella.pics/bf5a42e4-1350-499d-a728-493b0fcaeda4.jpg)

You can choose list`s type.

## Output data

| Field | Type     | Description                              |
| ----- | -------- | ---------------------------------------- |
| style | `string` | type of a list: `ordered` or `unordered` |
| items | `Item[]` | the array of list's items                |

Object `Item`:

| Field   | Type     | Description               |
| ------- | -------- | ------------------------- |
| content | `string` | item's string content     |
| items   | `Item[]` | the array of list's items |

```json
{
    "type" : "list",
    "data" : {
        "style" : "unordered",
        "items" : [
            {
              "content": "Apples",
              "items": [
                {
                  "content": "Red",
                  "items": []
                },
                {
                  "content": "Green",
                  "items": []
                },
              ]
            },
            {
              "content": "Bananas",
              "items": [
                {
                  "content": "Yellow",
                  "items": []
                },
              ]
            },
        ]
    }
},
```

---
_Source: https://npm.io/package/@demoflow/nested-list · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
