OpenParable
Skip to content
← Back to skills

Handsontable Celltype Dev

Development
handsontable-celltype-dev

Handsontable Celltype Dev is an Agent Skill for development published in the handsontable/handsontable repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Use when creating or modifying a Handsontable cell type that composes an editor, renderer, and validator into a reusable configuration object registered by name

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/handsontable/handsontable/blob/HEAD/.claude/skills/handsontable-celltype-dev/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/handsontable-celltype-dev, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Handsontable Cell Type Development

Structure

Cell types are composition objects, not classes. They bundle an editor, renderer, and validator under a single name:

export const MyCellType = {
  CELL_TYPE: 'myType',
  editor: MyEditor,
  renderer: myRenderer,
  validator: myValidator,
  // Optional:
  valueSetter: customSetter,
  valueGetter: customGetter,
  valueFormatter: customFormatter,
  dataType: 'myType',
};

When a column or cell sets type: 'myType', Handsontable applies all composed components automatically.

File structure

src/cellTypes/{typeName}/
  {typeName}.ts    # Cell type object
  index.ts         # Re-exports

Registry: src/cellTypes/registry.ts.

Registration

import { registerCellType } from '../../cellTypes/registry';
registerCellType(MyCellType);

Also export from src/cellTypes/index.ts so the type is available in the full bundle.

Integration with metaSchema

New cell types must be added to src/dataMap/metaManager/metaSchema.ts so Handsontable recognizes the type name in configuration. Add the type string to the type option's accepted values.

Key rules

  • Think of cell types as pre-configured bundles. They exist for convenience - users set one type instead of specifying editor, renderer, and validator separately.
  • All components are optional. A cell type can omit validator if no validation is needed, or omit editor for read-only display types.
  • Individual overrides win. If a user sets both type: 'myType' and renderer: customRenderer, the explicit renderer takes precedence over the one from the cell type.

Reference implementations

  • src/cellTypes/numericType/numericType.ts - Composes numeric editor, renderer, and validator.
  • src/cellTypes/textType/textType.ts - Simplest type, good starting template.
  • src/cellTypes/dateType/dateType.ts - Date handling with format options.
  • src/cellTypes/checkboxType/checkboxType.ts - Boolean toggle pattern.

Common mistakes

  • Forgetting to register the cell type in src/cellTypes/registry.ts.
  • Not adding the type to metaSchema.ts, causing Handsontable to ignore the type name.
  • Duplicating editor/renderer/validator logic instead of importing existing components.
  • Not exporting from src/cellTypes/index.ts for the full bundle.