• Stars
    star
    123
  • Rank 289,331 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 6 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Table constructor for Editor.js

Table tool

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

Installation

Get the package

yarn add @editorjs/table

Include module at your application

import Table from '@editorjs/table'

Optionally, you can load this tool from CDN JsDelivr CDN

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

Field Type Description
rows number initial number of rows. 2 by default
cols number initial number of columns. 2 by default
withHeadings boolean toggle table headings. false by default

Output data

This Tool returns data in the following format

Field Type Description
withHeadings boolean Uses the first line as headings
content string[][] two-dimensional array with table contents
{
  "type" : "table",
  "data" : {
    "withHeadings": true,
    "content" : [ [ "Kine", "Pigs", "Chicken" ], [ "1 pcs", "3 pcs", "12 pcs" ], [ "100$", "200$", "150$" ] ]
  }
}

CSP support

If you're using Content Security Policy (CSP) pass a nonce via <meta property="csp-nonce" content={{ nonce }} /> in your document head.

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 ๐Ÿ‘‹ Twitter Instagram
codex.so codex.so/join @codex_team @codex_team

More Repositories

1

awesome-editorjs

๐Ÿคฉ A curated list of awesome Editor.js tools, libraries and resources.
2,103
star
2

editorjs-php

PHP backend for Editor.js
PHP
242
star
3

image

Image Block for Editor.js
TypeScript
233
star
4

embed

Embed Tool for Editor.js
TypeScript
147
star
5

header

Header Tool for Editor.js 2.0
TypeScript
99
star
6

link

Link Tool for Editor.js 2.0
JavaScript
87
star
7

marker

Marker Tool for Editor.js 2.0
JavaScript
74
star
8

code

Code Tool for Editor.js 2.0
TypeScript
69
star
9

attaches

File attachments Block for the Editor.js
JavaScript
61
star
10

checklist

Checklist Tool for Editor.js
JavaScript
56
star
11

list

List Tool for Editor.js 2.0
JavaScript
55
star
12

raw

Raw HTML tool for Editor.js
JavaScript
55
star
13

simple-image

Simple Image Tool for Editor.js 2.0
JavaScript
52
star
14

nested-list

Multi-leveled lists for the Editor.js.
TypeScript
44
star
15

inline-code

Inline-Code Tool for Editor.js 2.0
TypeScript
43
star
16

personality

Personality Tool for Editor.js
JavaScript
42
star
17

paragraph

Paragraph Tool for Editor.js 2.0
TypeScript
41
star
18

quote

Quote Tool for Editor.js 2.0
TypeScript
36
star
19

delimiter

Delimiter plugin for Editor.js 2.0
TypeScript
34
star
20

link-autocomplete

An upgraded version of base inline link tool with your server's search.
JavaScript
28
star
21

simple-image-tutorial

Final result of guide series learning how to create own Block Tool
JavaScript
26
star
22

create-tool

Single command Editor.js Tool generator
TypeScript
25
star
23

warning

Warning Tool for CodeX Editor 2.0
JavaScript
23
star
24

underline

Inline tool for underlining text fragments
TypeScript
14
star
25

text-variant-tune

Block Tune for text variants: Call-out, Citation, Details
JavaScript
11
star
26

document-model

โ—๏ธWIPโ—๏ธ
TypeScript
10
star
27

footnotes-tune

Footnotes Block Tune for Editor.js
TypeScript
8
star
28

translate-inline

Translate Inline Tool for Editor.js
TypeScript
5
star
29

spoiler

Work in progress
JavaScript
5
star
30

audio

Work in progress
3
star
31

dev-tools

TypeScript
2
star
32

nft

Embed NFTs
TypeScript
2
star
33

.github

1
star