📋 Tables Plugin

Create and edit powerful data tables

Overview

The Tables plugin provides powerful table creation and editing capabilities with cell formatting, styling, and data management.

Features

  • ✅ Create tables with custom rows and columns
  • ✅ Add/remove rows and columns
  • ✅ Merge cells
  • ✅ Cell formatting (bold, italic, colors)
  • ✅ Table styling (borders, background)
  • ✅ Header rows
  • ✅ Copy/paste table data

Installation

npm install @editora/plugins/table

Basic Usage

import { Editor } from '@editora/core';
import { TablePlugin } from '@editora/plugins/table';

const editor = new Editor({
  element: '#editor',
  plugins: [TablePlugin()]
});

Creating a Table

  1. Click the "Insert Table" button in the toolbar
  2. Enter desired rows and columns
  3. Click "Create"

Table Commands

// Insert table
editor.execCommand('insertTable', { rows: 3, cols: 3 });

// Add row
editor.execCommand('addTableRow', { position: 'after' });

// Delete row
editor.execCommand('deleteTableRow');

// Add column
editor.execCommand('addTableColumn', { position: 'after' });

// Merge cells
editor.execCommand('mergeCells');

← Back to Plugins