1.0.1 • Published 2 years ago

@ct-note/list v1.0.1

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

npm.io

List Tool for Editor.js

This Tool for the Editor.js allows you to add ordered or unordered (bulleted) lists to your article.

npm.io

Installation

Install via NPM

Get the package

npm i --save @editorjs/list
yarn add @editorjs/list

Include module at your application

import List from '@editorjs/list';

Download to your project's source dir

  1. Upload folder dist from repository
  2. Add dist/bundle.js file to your page.

Load from CDN

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

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

Usage

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

import EditorJS from '@editorjs/editorjs';
import List from '@editorjs/list';

var editor = EditorJS({
  // ...
  tools: {
    ...
    list: {
      class: List,
      inlineToolbar: true,
      config: {
        defaultStyle: 'unordered'
      }
    },
  },
});

Config Params

FieldTypeDescription
defaultStylestringtype of a list: ordered or unordered, default is ordered

Tool's settings

npm.io

You can choose list`s type.

Output data

FieldTypeDescription
stylestringtype of a list: ordered or unordered
itemsstring[]the array of list's items
{
    "type" : "list",
    "data" : {
        "style" : "unordered",
        "items" : [
            "This is a block-styled editor",
            "Clean output data",
            "Simple and powerful API"
        ]
    }
},

I18n support

This tool supports the i18n api. To localize UI labels, put this object to your i18n dictionary under the tools section:

"list": {
  "Ordered": "Нумерованный",
  "Unordered": "Маркированный"
}

See more instructions about Editor.js internationalization here: https://editorjs.io/internationalization

acornajv-errorsajv-keywordsansi-regexajvanymatchansi-stylesarr-diffargparseaprobaarr-flattenarr-unionarray-uniqueasn1.jsassertassign-symbolsatobasync-eachbabel-plugin-dynamic-import-nodebalanced-matchbasebase64-jsbluebirdbig.jsbinary-extensionsbn.jsbrace-expansionbracesbrorandbrowserify-aesbrowserify-cipherbrowserify-desbrowserify-rsabrowserify-signbrowserify-zlibbrowserslistbufferbuffer-frombuffer-xorbuiltin-status-codescacachecache-basecaller-callsitecaller-pathcallsitescamelcasecaniuse-litechalkchokidarchownrchrome-trace-eventcipher-baseclass-utilscliuicollection-visitcolor-convertcolor-namecolorettecommandercommondircomponent-emitterconcat-mapconcat-streamconsole-browserifyconstants-browserifyconvert-source-mapcopy-concurrentlycopy-descriptorcore-js-compatcore-util-iscosmiconfigcreate-ecdhcreate-hashcreate-hmaccross-spawncrypto-browserifycssesccyclistdebugdecamelizedecode-uri-componentdefine-propertiesdefine-propertydes.jsdetect-filedomain-browserdiffie-hellmanelectron-to-chromiumellipticduplexifyemoji-regexemojis-listend-of-streamenhanced-resolveerror-exerrnoescape-string-regexpescaladeeslint-scopeesprimaesrecurseestraverseesutilseventsevp_bytestokeyexecaexpand-bracketsexpand-tildeextend-shallowextglobfast-deep-equalfast-json-stable-stringifyfiggy-puddingfill-rangefind-upfindup-syncfind-cache-dirflush-write-streamfor-infragment-cachefrom2fs-write-stream-atomicfs.realpathfunction-bindgensyncget-caller-fileget-streamglobget-valueglobal-modulesglob-parentglobal-prefixglobalsgraceful-fshas-flaghas-symbolshas-valuehas-valueshash-basehash.jshmac-drbghomedir-polyfillhttps-browserifyicss-utilsieee754import-cwdiferrimport-freshimport-fromimport-localimurmurhashindexes-ofinfer-ownerinflightinheritsiniinterpretinvariantis-accessor-descriptorinvert-kvis-arrayishis-binary-pathis-bufferis-data-descriptoris-descriptoris-directoryis-extendableis-extglobis-fullwidth-code-pointis-globis-numberis-plain-objectis-streamis-windowsisarrayisexeis-wslisobjectjs-tokensjs-yamljsescjson-parse-better-errorsjson-schema-traversejson5kind-oflcidlevenlevenaryloader-runnerloader-utilslodashlocate-pathloose-envifylru-cachemake-dirmap-age-cleanermap-cachemap-visitmd5.jsmemmemory-fsmicromatchmiller-rabinmimic-fnminimalistic-crypto-utilsminimalistic-assertminimatchminimistmississippimixin-deepmkdirpmove-concurrentlymsnanomatchneo-asyncnice-trynode-libs-browsernode-releasesnormalize-pathnpm-run-pathobject-assignobject-copyobject-keysobject-visitobject.assignonceobject.pickos-browserifyos-localep-deferp-finallyp-is-promisep-limitp-locatep-trypakoparallel-transformparse-asn1parse-jsonparse-passwdpascalcasepath-browserifypath-dirnamepath-is-absolutepath-existspath-keypath-parsepbkdf2picomatchpifypkg-dirposix-character-classespostcss-load-configpostcss-modules-extract-importspostcsspostcss-modules-local-by-defaultpostcss-modules-scopepostcss-resolve-nested-selectorpostcss-modules-valuespostcss-selector-parserpostcss-value-parserprivateprocessprocess-nextick-argspromise-inflightprrpublic-encryptpumpifypumppunycodequerystringquerystring-es3randombytesrandomfillreadable-streamreaddirpregenerate-unicode-propertiesregenerateregenerator-runtimeregex-notregenerator-transformregexpu-coreregjsgenremove-trailing-separatorrepeat-elementregjsparserrepeat-stringrequire-directoryrequire-main-filenameresolveresolve-cwdresolve-dirresolve-fromresolve-urlretrimrafripemd160run-queuesafe-regexsafe-buffersemverschema-utilsserialize-javascriptset-valueset-blockingsetimmediatesha.jsshebang-commandshebang-regexsignal-exitsnapdragon-nodesnapdragonsnapdragon-utilsource-list-mapsource-map-resolvesource-map-supportsource-mapsource-map-urlsplit-stringsprintf-jsssristatic-extendstream-browserifystream-eachstream-httpstream-shiftstring-widthstrip-ansistring_decoderstrip-eofsupports-colortapablethrough2tersertimers-browserifyterser-webpack-pluginto-arraybufferto-fast-propertiesto-object-pathto-regex-rangeto-regextslibtty-browserifytypedarrayunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptunicode-match-property-value-ecmascriptunion-valueuniqunicode-property-aliases-ecmascriptunique-filenameunique-slugunset-valueupathuri-jsurixurluseutilutil-deprecatev8-compile-cachevm-browserifywatchpackwatchpack-chokidar2webpack-sourceswhichwhich-modulewrappywrap-ansiworker-farmxtendy18nyallistyargsyargs-parser
1.0.1

2 years ago

1.0.0

2 years ago