1.0.0 • Published 2 years ago

@ct-note/table v1.0.0

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

Table tool

The Table Block for the Editor.js. Finally improved.

npm.io

Installation

Get the package

npm i --save @editorjs/table

or

yarn add @editorjs/table

Usage

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

import Table from '@editorjs/table';

var editor = EditorJS({
  tools: {
    table: Table,
  }
});

Or init the Table tool with additional settings

var editor = EditorJS({
  tools: {
    table: {
      class: Table,
      inlineToolbar: true,
      config: {
        rows: 2,
        cols: 3,
      },
    },
  },
});

Config Params

FieldTypeDescription
rowsnumberinitial number of rows. 2 by default
colsnumberinitial number of columns. 2 by default

Output data

This Tool returns data in the following format

FieldTypeDescription
withHeadingsbooleanUses the first line as headings
contentstring[][]two-dimensional array with table contents
{
  "type" : "table",
  "data" : {
    "withHeadings": true,
    "content" : [ [ "Kine", "Pigs", "Chicken" ], [ "1 pcs", "3 pcs", "12 pcs" ], [ "100$", "200$", "150$" ] ]
  }
}

Support maintenance 🎖

If you're using this tool and editor.js in your business, please consider supporting their maintenance and evolution.

http://opencollective.com/editorjs

About CodeX

CodeX is a team of digital specialists around the world interested in building high-quality open source products on a global market. We are open for young people who want to constantly improve their skills and grow professionally with experiments in leading technologies.

🌐Join 👋TwitterInstagram
codex.socodex.so/join@codex_team@codex_team
ajvacorn-dynamic-importacornacorn-jsxajv-keywordsajv-errorsalphanum-sortansi-escapesanymatchansi-regexansi-stylesargparsearr-diffaprobaarr-unionarray-uniqasn1.jsarr-flattenarray-unionassertarray-uniqueassign-symbolsasync-eachatobbasebabel-code-framebalanced-matchbig.jsbinary-extensionsbase64-jsbluebirdbn.jsboolbasebrace-expansionbracesbrorandbrowserify-aesbrowserify-cipherbrowserify-desbrowserify-rsabrowserify-signbrowserify-zlibbrowserslistbufferbuffer-frombuffer-xorbuiltin-modulescacachebuiltin-status-codescache-basecaller-pathcaller-callsitecamelcasecallsiteschalkcaniuse-litecaniuse-apichardetchokidarchownrchrome-trace-eventcipher-basecircular-jsonclass-utilscli-cursorcoacli-widthcode-point-atcliuicolor-convertcollection-visitcolor-namecolorcolor-stringcolorettecolorscommandercommondircomponent-emitterconcat-streamconcat-mapconstants-browserifyconsole-browserifycontains-pathcopy-descriptorcopy-concurrentlycore-util-iscosmiconfigcreate-ecdhcreate-hashcreate-hmaccross-spawncrypto-browserifycss-declaration-sortercss-color-namescss-selectcss-select-base-adaptercss-selector-tokenizercss-treecss-unit-convertercss-url-regexcss-whatcssesccssnano-preset-defaultcssnano-util-get-matchcssnano-util-get-argumentscssnano-util-raw-cachecssnano-util-same-parentcssocyclistdate-nowdebugdecamelizedecode-uri-componentdes.jsdefine-propertiesdeep-isdefine-propertydeldetect-filedoctrinediffie-hellmandom-serializerdomain-browserdomelementtypedomutilsdot-propduplexifyellipticelectron-to-chromiumemojis-listend-of-streamenhanced-resolveentitieserrnoerror-exes-abstractescaladeescape-string-regexpeslint-config-standardes-to-primitiveeslint-module-utilseslint-plugin-eseslint-import-resolver-nodeeslint-plugin-importeslint-plugin-nodeeslint-plugin-promiseeslint-plugin-standardeslint-scopeeslint-utilseslint-visitor-keysespreeesprimaesrecurseesqueryesutilsestraverseeventsevp_bytestokeyexpand-bracketsexecaexpand-tildeextend-shallowextglobexternal-editorfast-json-stable-stringifyfast-deep-equalfast-levenshteinfastparsefiggy-puddingfiguresfill-rangefile-entry-cachefind-cache-dirfindup-syncfind-upfor-infragment-cacheflat-cachefrom2fs-write-stream-atomicflush-write-streamfs.realpathfunction-bindfunctional-red-black-treeget-caller-fileget-streamget-valueglobglob-parentglobal-modulesglobal-prefixglobalsglobbygraceful-fshas-ansihashas-flaghas-valuehas-symbolshas-valueshash-basehash.jshex-color-regexhomedir-polyfillhmac-drbghsl-regexhsla-regexhtml-comment-regexhosted-git-infohttps-browserifyiconv-liteicss-replace-symbolsieee754icss-utilsiferrimport-cwdignoreimport-fromimport-freshimport-localimurmurhashindexes-ofinflightindexofinheritsiniinterpretinquirerinvert-kvis-absolute-urlis-accessor-descriptoris-arrayishis-binary-pathis-bufferis-callableis-data-descriptoris-color-stopis-core-moduleis-date-objectis-descriptoris-builtin-moduleis-directoryis-extendableis-extglobis-fullwidth-code-pointis-globis-numberis-path-cwdis-objis-path-in-cwdis-path-insideis-plain-objectis-regexis-promiseis-resolvableis-svgis-streamis-symbolis-windowsisarrayisexeisobjectjs-yamljs-tokensjsescjson-parse-better-errorsjson-stable-stringify-without-jsonifyjson-schema-traversejson5kind-oflcidlevnload-json-fileloader-utilsloader-runnerlocate-pathlodash.debouncelodash.memoizelodash.uniqlodashlru-cachemake-dirmamacromap-age-cleanermap-cachemap-visitmd5.jsmdn-datamicromatchmiller-rabinmemory-fsminimalistic-assertmimic-fnminimalistic-crypto-utilsmemminimistminimatchmississippimove-concurrentlymixin-deepmkdirpmute-streammsnanomatchnatural-compareneo-asyncnice-trynormalize-package-datanode-releasesnormalize-pathnode-libs-browsernormalize-rangenormalize-urlnth-checknpm-run-pathnumber-is-nannum2fractionobject-assignobject-copyobject-keysobject.getownpropertydescriptorsobject-visitobject.pickonetimeobject.valuesonceoptionatoros-tmpdiros-localeos-browserifyp-deferp-finallyp-is-promisep-limitp-locatep-mappakop-tryparse-asn1parallel-transformparse-passwdparse-jsonpascalcasepath-browserifypath-dirnamepath-is-insidepath-existspath-is-absolutepath-keypath-parsepath-typepbkdf2pifypinkiepinkie-promisepluralizepkg-dirposix-character-classespostcsspostcss-calcpostcss-colorminpostcss-convert-valuespostcss-discard-commentspostcss-discard-emptypostcss-discard-duplicatespostcss-discard-overriddenpostcss-load-configpostcss-merge-rulespostcss-merge-longhandpostcss-minify-font-valuespostcss-minify-gradientspostcss-minify-paramspostcss-minify-selectorspostcss-modules-extract-importspostcss-modules-local-by-defaultpostcss-modules-scopepostcss-modules-valuespostcss-normalize-display-valuespostcss-normalize-positionspostcss-normalize-charsetpostcss-normalize-stringpostcss-normalize-repeat-stylepostcss-normalize-timing-functionspostcss-normalize-unicodepostcss-normalize-whitespacepostcss-ordered-valuespostcss-normalize-urlpostcss-reduce-initialpostcss-reduce-transformspostcss-unique-selectorspostcss-selector-parserpostcss-svgoprelude-lspostcss-value-parserprocesspromise-inflightprocess-nextick-argsprogresspublic-encryptprrpumppunycodeqpumpifyquerystringrandombytesquerystring-es3randomfillread-pkgread-cacheread-pkg-upreaddirpreadable-streamregenerateregex-notregexppregexpu-coreregjsgenremove-trailing-separatorregjsparserrepeat-elementrequire-directoryrepeat-stringrequire-from-stringrequire-uncachedresolverequire-main-filenameresolve-cwdresolve-urlrestore-cursorresolve-dirresolve-fromretrgb-regexrgba-regexrimrafripemd160run-asyncrun-queuerxjssafe-buffersafer-buffersafe-regexschema-utilssaxserialize-javascriptsemverset-blockingset-valuesha.jsshebang-commandshebang-regexsignal-exitsimple-swizzlesimple-html-tokenizerslice-ansisnapdragonsnapdragon-nodesnapdragon-utilsource-list-mapsource-mapsource-map-resolvesource-map-supportspdx-correctsource-map-urlspdx-license-idssetimmediatespdx-exceptionsspdx-expression-parsesprintf-jssplit-stringssristablestatic-extendstream-browserifystream-eachstream-httpstream-shiftstring_decoderstring-widthstrip-ansistrip-bomstrip-json-commentsstrip-eofstylehackssupports-colortablesvgoterserthroughtapableterser-webpack-plugintext-tablethrough2timers-browserifytmptimsortto-arraybufferto-object-pathto-regextslibto-regex-rangetype-checktypedarraytty-browserifyunion-valueuniquniqsunique-filenameunique-slugunquoteunset-valueupathuri-jsurixurluseutilutil.promisifyutil-deprecatevalidate-npm-package-licensevendorsvm-browserifywatchpackwebpack-sourceswhich-modulewhichwrap-ansiworker-farmwrappyv8-compile-cachewordwrapwritextendyallistyargsyargs-parsery18n
1.0.0

2 years ago