Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: reintroducing table cell schema changes [TOL-2249] #622

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion packages/rich-text-types/src/nodeTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,20 @@ export interface TableCell extends Block {
/**
* @minItems 1
*/
content: Paragraph[];
content: (Paragraph | OrderedList | UnorderedList)[];
}

// Notice that this is only exported and not reused anywhere else in this file
// this is because this we only want this interface to generate the schema
// if we end up decouping the header cell from the regular cell we
// end up with unwanted side effects when validating the schema in @contentful/validation
export interface TableHeaderCell extends TableCell {
aodhagan-cf marked this conversation as resolved.
Show resolved Hide resolved
nodeType: BLOCKS.TABLE_HEADER_CELL;

/**
* @minItems 1
*/
content: Paragraph[];
}

// An abstract table row can have both table cell types
Expand Down
Loading
Loading