Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

@tiptap/extension-table-cell

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-table-cell

table cell extension for tiptap


Version published
Weekly downloads
289K
decreased by-15.29%
Maintainers
0
Weekly downloads
 
Created

What is @tiptap/extension-table-cell?

@tiptap/extension-table-cell is an extension for the Tiptap editor that provides functionality for working with table cells. It allows you to create, manipulate, and style table cells within the Tiptap rich-text editor.

What are @tiptap/extension-table-cell's main functionalities?

Create Table Cell

This feature allows you to create a table cell within the Tiptap editor. By including the TableCell extension, you can add table cells to your editor.

import { TableCell } from '@tiptap/extension-table-cell';

const editor = new Editor({
  extensions: [
    TableCell,
  ],
});

Set Cell Attributes

This feature allows you to set custom attributes for table cells. In this example, a custom class is added to the table cells.

import { TableCell } from '@tiptap/extension-table-cell';

const editor = new Editor({
  extensions: [
    TableCell.configure({
      HTMLAttributes: {
        class: 'my-custom-class',
      },
    }),
  ],
});

Merge Cells

This feature allows you to merge multiple table cells into one. The mergeCells command is used to perform the merge operation.

import { TableCell, mergeCells } from '@tiptap/extension-table-cell';

const editor = new Editor({
  extensions: [
    TableCell,
  ],
});

// Example function to merge cells
editor.commands.mergeCells();

Other packages similar to @tiptap/extension-table-cell

FAQs

Package last updated on 25 Jun 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts