0.0.1 • Published 3 years ago

@synthit/nested-list v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

This Tool has no config params

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-keywordsastral-regexansi-colorsansi-stylesansi-regexargparsebrace-expansionbig.jscallsitesbalanced-matchcamelcasechalkbuffer-fromcaniuse-litebrowserslistcolor-convertcolor-namechrome-trace-eventcommondirconcat-mapclone-deepcolorettedeep-iscosmiconfigcommanderemojis-listdebugcross-spawncssescdoctrineemoji-regexelectron-to-chromiumenhanced-resolveerror-exenquirerescape-string-regexpes-module-lexerenvinfoeslint-scopeesprimaescaladeeslint-visitor-keysespreeestraverseeslint-utilsesrecursefast-levenshteinesutilseventsesqueryfastest-levenshteinfind-upexecafast-deep-equalfast-json-stable-stringifyfind-cache-dirfs-extrafs.realpathflattedfile-entry-cachefunctional-red-black-treefunction-bindflat-cacheglob-to-regexpgraceful-fsglob-parentget-streamhasglobglobalshuman-signalshas-flagimport-freshignoreinflighticss-utilsis-arrayishinheritsindexes-ofis-extglobimurmurhashinterpretis-globis-fullwidth-code-pointis-streamis-core-moduleimport-localisobjectisexeis-plain-objectjson-parse-better-errorsjson-schema-traversejson-stable-stringify-without-jsonifyjsonfilejs-tokensjest-workerjs-yamljson-parse-even-better-errorsjson5levnklonalines-and-columnslocate-pathkind-ofloader-runnerloader-utilsmimic-fnminimatchlru-cachemerge-streammake-dirmime-typeslodashminimistnatural-comparemime-dbmsoncenanoidonetimep-locatep-trynpm-run-pathoptionatornode-releasesobject-hashneo-asyncpath-existsparse-jsonpath-is-absolutepath-parsep-limitpath-typepkg-dirpath-keypostcss-resolve-nested-selectorparent-modulepostcss-modules-valuespostcss-modules-local-by-defaultpostcss-modules-scopeprelude-lsprogresspunycodepostcss-value-parserrechoirpostcss-modules-extract-importsrandombytespostcss-selector-parserregexppresolve-fromrequire-from-stringsafe-buffershallow-clonerimrafserialize-javascriptsemverschema-utilssignal-exitsource-list-mapshebang-regexresolveshebang-commandresolve-cwdsource-mapstrip-final-newlinesprintf-jssource-map-supportstring-widthslice-ansistrip-json-commentsstrip-ansitext-tablesupports-colortersertabletapableuniqutil-deprecatetype-checktslibterser-webpack-pluginuniversalifyv8-compile-cachewebpack-sourceswebpack-mergetype-festword-wrapwrappywildcarduri-jswatchpackwhichyocto-queueyallistyaml
0.0.1

3 years ago