Search by

uams-web / aether-tables

joshdaughertybpmore

Table sanitizing and pasted-table handling for Statamic editors.

Package info

github.com/UAMS-Web/aether-tables

Language:JavaScript

Type:statamic-addon

pkg:composer/uams-web/aether-tables

Statistics

Installs: 29 627

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 4

v0.2.2 2026-11-22 21:56 UTC

README

Table sanitizing and pasted-table handling for Statamic's editors, by UAMS Web Services. The package is uams-web/aether-tables, in the UAMSWeb\Aether\Tables\ namespace.

What it does

  • The sanitize_table_cell Antlers modifier, which renders a table cell through HTMLPurifier against a small inline allowlist (links and basic emphasis; everything else is stripped).

  • Pasted-table parsing: the table_data_paste_trigger trigger turns pasted HTML, TSV or CSV into the table_data value.

  • Spreadsheet import: the table_data_importer_trigger trigger reads an uploaded spreadsheet asset into table_data.

  • The tables collection's table blueprint, served as the collection's own with its handle unchanged, and the table Bard set, registered with uams-web/aether-page-builder as aether-tables::uamsweb_set_table. The page builder ships its own identical copy of the set until it drops it, and the registry keeps that copy while it exists.

The collection definition, its entries, the fieldsets the blueprint and set import (uamsweb_common, uamsweb_common_block, uamsweb_common_table, uamsweb_common_table_features, uamsweb_common_table_style and uamsweb_computed_content_usage), and the Table set's template, script and styles belong to the site and stay in the site.

Requirements

  • PHP 8.4 or later
  • Statamic 6.35 or later
  • uams-web/aether-page-builder, which holds the registry the Table set registers with
  • A host application that supplies the fieldsets listed above, which the blueprint and set import by their unprefixed handles

Installation

composer require uams-web/aether-tables

Publish the configuration file to the host application's config/ directory with:

php artisan vendor:publish --tag=aether-tables-config

It merges into the tables config key. The settings are:

  • tables.cell_sanitizer.cache_path: where HTMLPurifier stores its compiled definitions (default storage/app/htmlpurifier).
  • tables.trigger_event: the class name of the event the host dispatches when a trigger field is activated in the Control Panel. The paste and import listeners listen for it. The event carries entry, triggerHandle and formValues properties. The default is App\Events\TriggerActivated.

Statamic runs only allowlisted modifiers on content data. The add-on adds sanitize_table_cell to statamic.antlers.allowedContentModifiers itself, so the host does not have to.

Development and release

License

MIT. See LICENSE.