1.0.2 • Published 2 years ago

@demoflow/nested-list v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

npm.io

Nested List Tool for Editor.js

Multi-leveled lists for the Editor.js.

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

npm.io

Installation

Install via NPM

Get the package

npm i --save @editorjs/nested-list

Or

yarn add @editorjs/nested-list

Include module at your application

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

Load from CDN

Load the script from jsDelivr CDN and connect to your page.

<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.

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

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

Config Params

FieldTypeDescription
defaultListStylestringtype of default list: ordered or unordered

Tool's settings

npm.io

You can choose list`s type.

Output data

FieldTypeDescription
stylestringtype of a list: ordered or unordered
itemsItem[]the array of list's items

Object Item:

FieldTypeDescription
contentstringitem's string content
itemsItem[]the array of list's items
{
    "type" : "list",
    "data" : {
        "style" : "unordered",
        "items" : [
            {
              "content": "Apples",
              "items": [
                {
                  "content": "Red",
                  "items": []
                },
                {
                  "content": "Green",
                  "items": []
                },
              ]
            },
            {
              "content": "Bananas",
              "items": [
                {
                  "content": "Yellow",
                  "items": []
                },
              ]
            },
        ]
    }
},
acornacorn-jsxajvajv-keywordsansi-colorsansi-regexansi-stylesargparseastral-regexbalanced-matchbig.jsbrace-expansionbrowserslistbuffer-fromcallsitescamelcasecaniuse-litechalkchrome-trace-eventclone-deepcolor-convertcolor-namecolorettecommandercommondirconcat-mapcosmiconfigcross-spawncssescdebugdeep-isdoctrineelectron-to-chromiumemoji-regexemojis-listenhanced-resolveenquirerenvinfoerror-exes-module-lexerescaladeescape-string-regexpeslint-scopeeslint-utilseslint-visitor-keysespreeesprimaesqueryesrecurseestraverseesutilseventsexecafast-deep-equalfast-json-stable-stringifyfast-levenshteinfastest-levenshteinfile-entry-cachefind-cache-dirfind-upflat-cacheflattedfs-extrafs.realpathfunction-bindfunctional-red-black-treeget-streamglobglob-parentglob-to-regexpglobalsgraceful-fshashas-flaghuman-signalsicss-utilsignoreimport-freshimport-localimurmurhashindexes-ofinflightinheritsinterpretis-arrayishis-core-moduleis-extglobis-fullwidth-code-pointis-globis-plain-objectis-streamisexeisobjectjest-workerjs-tokensjs-yamljson-parse-better-errorsjson-parse-even-better-errorsjson-schema-traversejson-stable-stringify-without-jsonifyjson5jsonfilekind-ofklonalevnlines-and-columnsloader-runnerloader-utilslocate-pathlodashlru-cachemake-dirmerge-streammime-dbmime-typesmimic-fnminimatchminimistmsnanoidnatural-compareneo-asyncnode-releasesnpm-run-pathobject-hashonceonetimeoptionatorp-limitp-locatep-tryparent-moduleparse-jsonpath-existspath-is-absolutepath-keypath-parsepath-typepkg-dirpostcss-modules-extract-importspostcss-modules-local-by-defaultpostcss-modules-scopepostcss-modules-valuespostcss-resolve-nested-selectorpostcss-selector-parserpostcss-value-parserprelude-lsprogresspunycoderandombytesrechoirregexpprequire-from-stringresolveresolve-cwdresolve-fromrimrafsafe-bufferschema-utilssemverserialize-javascriptshallow-cloneshebang-commandshebang-regexsignal-exitslice-ansisource-list-mapsource-mapsource-map-supportsprintf-jsstring-widthstrip-ansistrip-final-newlinestrip-json-commentssupports-colortabletapableterserterser-webpack-plugintext-tabletslibtype-checktype-festuniquniversalifyuri-jsutil-deprecatev8-compile-cachewatchpackwebpack-mergewebpack-sourceswhichwildcardword-wrapwrappyyallistyamlyocto-queue
1.0.2

2 years ago

1.0.1

2 years ago

1.0.1-jm

2 years ago

1.0.0

2 years ago