Type Editor / @type-editor/tables / schema
schema
Helper utilities for creating a ProseMirror schema that supports tables.
This module provides functions to generate node specifications for table-related nodes (table, row, cell, header) and utilities for working with table node types.
Interfaces
| Interface | Description |
|---|---|
Configuration for a custom cell attribute. Custom cell attributes allow extending table cells with additional properties that are persisted in the document and serialized to HTML. | |
Options for configuring table node specifications. |
Type Aliases
| Type Alias | Description |
|---|---|
Function type for reading an attribute value from a DOM element. | |
Function type for setting an attribute value on a DOM attributes object. | |
Record type for the table node specifications. Contains node specs for all four table-related node types. | |
Identifies the role of a node within a table structure.
|
Functions
| Function | Description |
|---|---|
Creates node specifications for table-related nodes. This function generates a set of https://prosemirror.net/docs/ref/#model.NodeSpec|NodeSpec objects for Example typescript | |
Retrieves the table-related node types from a schema. This function returns a mapping from table roles to their corresponding NodeType objects. Results are cached on the schema for performance. Example typescript |