# editorjs-table-border-togglle

> Table for Editor.js

Latest version **2.0.1** (published 2022-03-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install editorjs-table-border-togglle
pnpm add editorjs-table-border-togglle
yarn add editorjs-table-border-togglle
bun add editorjs-table-border-togglle
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2022-03-06 |
| First published | 2022-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 755.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Anant Sharma |
| Maintainers | anant-sharma |
| Keywords | codex, codex-editor, table, editor.js, editorjs |

## Links

- npm: https://www.npmjs.com/package/editorjs-table-border-togglle
- Repository: https://github.com/Chipserver/table
- npm.io page: https://npm.io/package/editorjs-table-border-togglle

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 2.0.1 (latest) — 2022-03-06

## README

# Table tool

The Table Block for the [Editor.js](https://editorjs.io). Finally improved.

![](https://capella.pics/41294cec-a2b3-4157-8399-ffefed3d8ffd.jpg)

## Installation

Get the package

```shell
npm i --save editorjs-table-border-toggle
```
or

```shell
yarn add editorjs-table-border-toggle
```

## Usage

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

```javascript
import Table from 'editorjs-table-border-toggle';

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

Or init the Table tool with additional settings

```javascript
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 |

## Output data

This Tool returns `data` in the following format

| Field          | Type         | Description           |
| -------------- | ------------ | ----------------------------------------- |
| `withHeadings` | `boolean`    | Uses the first line as headings |
| `withBorders` | `boolean`     | Toggles between table border  |
| `content`      | `string[][]` | two-dimensional array with table contents |

```json
{
  "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](http://opencollective.com/editorjs)

# About CodeX

<img align="right" width="120" height="120" src="https://codex.so/public/app/img/codex-logo.svg" hspace="50">

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](https://codex.so/join) for young people who want to constantly improve their skills and grow professionally with experiments in leading technologies.

| 🌐 | Join  👋  | Twitter | Instagram |
| -- | -- | -- | -- |
| [codex.so](https://codex.so) | [codex.so/join](https://codex.so/join) |[@codex_team](http://twitter.com/codex_team) | [@codex_team](http://instagram.com/codex_team) |

---
_Source: https://npm.io/package/editorjs-table-border-togglle · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
