UNPKG

docxml

Version:

TypeScript (component) library for building and parsing a DOCX file

46 lines (45 loc) 1.68 kB
import { type Length } from '../utilities/length.js'; import { type Border, type LineBorderType, type Shading } from './shared-properties.js'; export declare type TableCellProperties = { /** * The amount of columns spanned by this cell. Defaults to `1`. */ colSpan?: null | number; /** * The amount of rows spanned by this cell. Defaults to `1`. */ rowSpan?: null | number; /** * The width of this cell. */ width?: null | Length; /** * The background color of this cell, optionally with a pattern in a secondary color. */ shading?: null | Shading; /** * The border on any side of this cell, or between diagonally across in either direction. */ borders?: null | { top?: null | Border<LineBorderType>; start?: null | Border<LineBorderType>; bottom?: null | Border<LineBorderType>; end?: null | Border<LineBorderType>; insideH?: null | Border<LineBorderType>; insideV?: null | Border<LineBorderType>; /** * Diagonally from top-left to bottom-right. Like a backward slash. */ tl2br?: null | Border<LineBorderType>; /** * Diagonally from top-right to bottom-left. Like a forward slash. */ tr2bl?: null | Border<LineBorderType>; }; /** * The vertical alignment of this cell. */ verticalAlignment?: null | 'bottom' | 'center' | 'top'; }; export declare function tableCellPropertiesFromNode(node?: Node | null): TableCellProperties; export declare function tableCellPropertiesToNode(tcpr: TableCellProperties | undefined, asRepeatingNode: boolean): Node;