Docs sub-types
Composite types referenced by document snapshots, rich-text bodies, paragraphs, and text runs.
Composite types referenced by document snapshots, rich-text bodies, paragraphs, and text runs. Supporting IDocumentData, IDocumentBody, ITextRun, ITextStyle. Types are ordered from direct top-level fields to deeper nested structures and enums.
Overview
ICustomBlock
import type { ICustomBlock } from '@univerjs/core' · Used by IDocumentBody
Custom Block
interface ICustomBlock { startIndex: number blockType?: BlockType blockId: string noteType?: 'footnote' | 'endnote' | 'separator' | 'continuationSeparator' noteId?: string docxRawXml?: string docxExportTs?: ITextStyle}Related types: BlockType · ITextStyle
ICustomColumnGroup
import type { ICustomColumnGroup } from '@univerjs/core' · Used by IDocumentBody
interface ICustomColumnGroup { startIndex: number endIndex: number columnGroupId: string columns?: IColumn[] gap?: INumberUnit layout?: ColumnLayoutType responsive?: ColumnResponsiveType version?: number}Related types: IColumn · INumberUnit · ColumnLayoutType · ColumnResponsiveType
ICustomDecoration
import type { ICustomDecoration } from '@univerjs/core' · Used by IDocumentBody
interface ICustomDecoration { startIndex: number endIndex: number id: string type: CustomDecorationType}Related types: CustomDecorationType
ICustomRange
import type { ICustomRange } from '@univerjs/core' · Used by IDocumentBody
Block element, link like, disabled to self nested
interface ICustomRange<T extends Record<string, any> = Record<string, any>> { startIndex: number endIndex: number rangeId: string rangeType: CustomRangeType | number wholeEntity?: boolean properties?: T}Related types: CustomRangeType
ICustomTable
import type { ICustomTable } from '@univerjs/core' · Used by IDocumentBody
interface ICustomTable { startIndex: number endIndex: number tableId: string}IDocStyles
import type { IDocStyles } from '@univerjs/core' · Used by IDocumentData
Set of IStyles
interface IDocStyles { [styleId: string]: IDocStyle}Related types: IDocStyle
IDocTextFill
import type { IDocTextFill } from '@univerjs/core' · Used by ITextStyle
interface IDocTextFill { type: DocTextFillType color?: string opacity?: number gradient?: { type?: DocTextFillGradientType angle?: number stops?: IDocTextFillGradientStop[] } picture?: { source?: string sourceType?: ImageSourceType opacity?: number mode?: DocTextFillPictureMode scaleX?: number scaleY?: number offsetX?: number offsetY?: number }}Related types: DocTextFillType · DocTextFillGradientType · IDocTextFillGradientStop · ImageSourceType · DocTextFillPictureMode
IDocTextOutline
import type { IDocTextOutline } from '@univerjs/core' · Used by ITextStyle
interface IDocTextOutline { color?: string width?: number}IDocumentBlockRange
import type { IDocumentBlockRange } from '@univerjs/core' · Used by IDocumentBody
interface IDocumentBlockRange { startIndex: number endIndex: number blockId: string blockType: DocumentBlockRangeType}Related types: DocumentBlockRangeType
IDocumentCustomProperty
import type { IDocumentCustomProperty } from '@univerjs/core' · Used by IDocumentData
type IDocumentCustomProperty = | { type: 'string' | 'date'; value: string } | { type: 'integer' | 'number'; value: number } | { type: 'boolean'; value: boolean }IDocumentNote
import type { IDocumentNote } from '@univerjs/core' · Used by IDocumentData
Notes have editable content, but no independent page setup or nested notes.
interface IDocumentNote { noteId: string type: DocumentNoteType body: IDocumentBody tableSource?: ITables drawings?: IDrawings drawingsOrder?: string[] lists?: ILists customMark?: string referenceTextStyle?: ITextStyle showBodyReference?: boolean}Related types: DocumentNoteType · IDocumentBody · ITables · IDrawings · ILists · ITextStyle
IDocumentSettings
import type { IDocumentSettings } from '@univerjs/core' · Used by IDocumentData
interface IDocumentSettings { zoomRatio?: number}IDocumentStyle
import type { IDocumentStyle } from '@univerjs/core' · Used by IDocumentData
interface IDocumentStyle extends IDocStyleBase, IDocumentLayout, IHeaderAndFooterBase { compatibilityFlags?: Record<string, BooleanNumber> compatibilitySettings?: Record<string, string> textStyle?: ITextStyle defaultFontTheme?: 'major' | 'minor' latinFontScheme?: { major?: string; minor?: string } fontFamilyFallbacks?: Record<string, string> fontFamilyClasses?: Record< string, 'auto' | 'decorative' | 'modern' | 'roman' | 'script' | 'swiss' > eastAsiaFontScheme?: { major: { fontFamily?: string; scriptFonts?: Record<string, string> } minor: { fontFamily?: string; scriptFonts?: Record<string, string> } language?: string } defaultParagraphStyle?: IDocumentDefaultParagraphStyle defaultParagraphStyleId?: string defaultTableStyleId?: string background?: IDocumentBackground}Related types: IDocStyleBase · IDocumentLayout · IHeaderAndFooterBase · BooleanNumber · ITextStyle · IDocumentDefaultParagraphStyle · IDocumentBackground
IDocxExportExcludedRange
import type { IDocxExportExcludedRange } from '@univerjs/core' · Used by IDocumentBody
interface IDocxExportExcludedRange { start: number end: number}IDocxNoteStory
import type { IDocxNoteStory } from '@univerjs/core' · Used by IDocumentData · IReferenceSource
A note story keyed by its OOXML id, independently of its displayed number.
interface IDocxNoteStory { noteId: string type: 'normal' | 'separator' | 'continuationSeparator' | 'continuationNotice' body: IDocumentBody tableSource?: ITables}Related types: IDocumentBody · ITables
IDocxRawBlock
import type { IDocxRawBlock } from '@univerjs/core' · Used by IDocumentBody
interface IDocxRawBlock { startIndex: number xml: string}IDrawings
import type { IDrawings } from '@univerjs/core' · Used by IDocumentData · IReferenceSource · IDocumentNote
Set of Drawings
interface IDrawings { [drawingId: string]: IDocDrawingBase}Related types: IDocDrawingBase
IFooters
import type { IFooters } from '@univerjs/core' · Used by IDocumentData · IReferenceSource
Set of footer
interface IFooters { [footerId: string]: IFooterData}Related types: IFooterData
IHeaders
import type { IHeaders } from '@univerjs/core' · Used by IDocumentData · IReferenceSource
Set of headers
interface IHeaders { [headerId: string]: IHeaderData}Related types: IHeaderData
ILists
import type { ILists } from '@univerjs/core' · Used by IDocumentData · IReferenceSource · IDocumentNote
Set of lists
interface ILists { [listType: string]: IListData}Related types: IListData
INoteSettings
import type { INoteSettings } from '@univerjs/core' · Used by IDocumentData
interface INoteSettings { footnote?: IFootnoteSettings endnote?: IEndnoteSettings}Related types: IFootnoteSettings · IEndnoteSettings
IParagraph
import type { IParagraph } from '@univerjs/core' · Used by IDocumentBody
interface IParagraph { startIndex: number paragraphId: string headingCollapsed?: boolean styleId?: string paragraphStyle?: IParagraphStyle bullet?: Partial<IBullet> | null sourceBullet?: IBullet | null directBullet?: IBullet | null}Related types: IParagraphStyle · IBullet
IReferenceSource
import type { IReferenceSource } from '@univerjs/core' · Used by IDocumentData · IFooterData · IHeaderData
interface IReferenceSource { tableSource?: ITables footers?: IFooters headers?: IHeaders footnotes?: Record<string, IDocxNoteStory> endnotes?: Record<string, IDocxNoteStory> lists?: ILists drawings?: IDrawings drawingsOrder?: string[] headerFooterDrawingsOrder?: string[]}Related types: ITables · IFooters · IHeaders · IDocxNoteStory · ILists · IDrawings
ISectionBreak
import type { ISectionBreak } from '@univerjs/core' · Used by IDocumentBody
Properties of section break
interface ISectionBreak extends IDocStyleBase, ISectionBreakBase, IHeaderAndFooterBase { sectionId: string startIndex: number}Related types: IDocStyleBase · ISectionBreakBase · IHeaderAndFooterBase
ITables
import type { ITables } from '@univerjs/core' · Used by IDocumentData · IReferenceSource · IDocumentNote · IDocxNoteStory · IDocumentNoteDecoration
interface ITables { [tableId: string]: ITable}Related types: ITable
TabStopAlignment
import { TabStopAlignment } from '@univerjs/core' · Used by ITextStyle · ITabStop
The alignment of the tab stop.
enum TabStopAlignment { TAB_STOP_ALIGNMENT_UNSPECIFIED = 0, // The tab stop alignment is unspecified. START = 1, // The tab stop is aligned to the start of the line. This is the default. CENTER = 2, // The tab stop is aligned to the center of the line. END = 3, // The tab stop is aligned to the end of the line.}TabStopLeader
import { TabStopLeader } from '@univerjs/core' · Used by ITextStyle · ITabStop
enum TabStopLeader { TAB_STOP_LEADER_UNSPECIFIED = 0, NONE = 1, DOT = 2, HYPHEN = 3, UNDERSCORE = 4, HEAVY = 5, MIDDLE_DOT = 6,}BlockType
import { BlockType } from '@univerjs/core' · Used by ICustomBlock
Type of block
enum BlockType { DRAWING = 0, CUSTOM = 1,}ColumnLayoutType
import { ColumnLayoutType } from '@univerjs/core' · Used by ICustomColumnGroup
enum ColumnLayoutType { FIXED = 'fixed', AUTO = 'auto',}ColumnResponsiveType
import { ColumnResponsiveType } from '@univerjs/core' · Used by ICustomColumnGroup
enum ColumnResponsiveType { STACK = 'stack', SHRINK = 'shrink',}CustomDecorationType
import { CustomDecorationType } from '@univerjs/core' · Used by ICustomDecoration
enum CustomDecorationType { COMMENT = 0, DELETED = 9999,}CustomRangeType
import { CustomRangeType } from '@univerjs/core' · Used by ICustomRange
enum CustomRangeType { HYPERLINK = 0, FIELD = 1, // 17.16 Fields and Hyperlinks SDT = 2, // 17.5.2 Structured Document Tags BOOKMARK = 3, COMMENT = 4, CUSTOM = 5, MENTION = 6, UNI_FORMULA = 7, FOOTNOTE = 8, ENDNOTE = 9, DELTED = 9999,}DocTextFillGradientType
import type { DocTextFillGradientType } from '@univerjs/core' · Used by IDocTextFill
type DocTextFillGradientType = 'linear' | 'radial' | 'angular' | 'diamond'DocTextFillPictureMode
import type { DocTextFillPictureMode } from '@univerjs/core' · Used by IDocTextFill
type DocTextFillPictureMode = 'stretch' | 'tile'DocTextFillType
import type { DocTextFillType } from '@univerjs/core' · Used by IDocTextFill
Properties of text style
type DocTextFillType = 'none' | 'solid' | 'gradient' | 'picture'DocumentBlockRangeType
import { DocumentBlockRangeType } from '@univerjs/core' · Used by IDocumentBlockRange
enum DocumentBlockRangeType { CALLOUT = 'callout', QUOTE = 'quote', CODE = 'code',}DocumentNoteType
import type { DocumentNoteType } from '@univerjs/core' · Used by IDocumentNote
type DocumentNoteType = 'footnote' | 'endnote'IBullet
import type { IBullet } from '@univerjs/core' · Used by IParagraph · IDocStyle
Properties of list
interface IBullet { listType: string listId: string nestingLevel: number startNumber?: number image?: { source: string } textStyle?: ITextStyle}Related types: ITextStyle
IColumn
import type { IColumn } from '@univerjs/core' · Used by ICustomColumnGroup
interface IColumn { columnId: string widthRatio: number minWidth?: INumberUnit}Related types: INumberUnit
IDocDrawingBase
import type { IDocDrawingBase } from '@univerjs/core' · Used by IDrawings
Properties of Drawing 20.4.2.8 inline (Inline DrawingML Object) 20.4.2.15 wrapNone (No Text Wrapping) 20.4.2.16 wrapPolygon (Wrapping Polygon) 20.4.2.17 wrapSquare (Square Wrapping) 20.4.2.18 wrapThrough (Through Wrapping) 20.4.2.19 wrapTight (Tight Wrapping) 20.4.2.20 wrapTopAndBottom (Top and Bottom Wrapping)
interface IDocDrawingBase extends IDrawingParam { drawingId: string title?: string description?: string docTransform: IDocDrawingPosition layoutType: PositionedObjectLayoutType behindDoc?: BooleanNumber layoutInCell?: BooleanNumber allowOverlap?: BooleanNumber relativeHeight?: number start?: number[] lineTo?: number[][] wrapText?: WrapTextType distL?: number distR?: number distT?: number distB?: number effectExtent?: { left?: number; top?: number; right?: number; bottom?: number } drawingMLSizeScale?: { width: number; height: number }}Related types: IDrawingParam · IDocDrawingPosition · PositionedObjectLayoutType · BooleanNumber · WrapTextType
IDocStyle
import type { IDocStyle } from '@univerjs/core' · Used by IDocStyles
interface IDocStyle { name: string customStyle?: boolean aliases?: string[] basedOn?: string link?: string type: DocStyleType textStyle?: ITextStyle paragraphStyle?: IParagraphStyle tableProperties?: Pick<ITable, 'cellSpacing'> rowProperties?: Pick<ITableRow, 'cellSpacing'> conditionalStyles?: Partial< Record< | 'wholeTable' | 'firstRow' | 'lastRow' | 'firstCol' | 'lastCol' | 'band1Horz' | 'band2Horz' | 'band1Vert' | 'band2Vert' | 'nwCell' | 'neCell' | 'swCell' | 'seCell', Pick<IDocStyle, 'textStyle' | 'paragraphStyle'> > > bullet?: Partial<IBullet> | null}Related types: DocStyleType · ITextStyle · IParagraphStyle · ITable · ITableRow
IDocStyleBase
import type { IDocStyleBase } from '@univerjs/core' · Used by IDocumentStyle · ISectionBreak
Basics properties of doc style.
interface IDocStyleBase extends IMargin { pageBorders?: IPageBorders pageNumberStart?: number pageNumberFormat?: string pageSize?: ISize pageOrient?: PageOrientType documentFlavor?: DocumentFlavor marginHeader?: number marginFooter?: number renderConfig?: IDocumentRenderConfig}Related types: IMargin · IPageBorders · ISize · PageOrientType · DocumentFlavor · IDocumentRenderConfig
IDocTextFillGradientStop
import type { IDocTextFillGradientStop } from '@univerjs/core' · Used by IDocTextFill
interface IDocTextFillGradientStop { offset: number color: string opacity?: number}IDocumentBackground
import type { IDocumentBackground } from '@univerjs/core' · Used by IDocumentStyle
interface IDocumentBackground { source?: string sourceType?: ImageSourceType}Related types: ImageSourceType
IDocumentDefaultParagraphStyle
import type { IDocumentDefaultParagraphStyle } from '@univerjs/core' · Used by IDocumentStyle
Paragraph properties that may be inherited from the document defaults. Paragraph identity and named/text styles have their own inheritance mechanisms.
type IDocumentDefaultParagraphStyle = Omit< IParagraphStyle, | 'headingId' | 'namedStyleType' | 'outlineLevel' | 'textStyle' | 'paragraphMarkTextStyle' | 'paragraphMarkStyleId'>Related types: IParagraphStyle
IDocumentLayout
import type { IDocumentLayout } from '@univerjs/core' · Used by IDocumentStyle
interface IDocumentLayout { defaultTabStop?: number characterSpacingControl?: characterSpacingControlType useFELayout?: BooleanNumber splitPageBreakAndParagraphMark?: BooleanNumber balanceSingleByteDoubleByteWidth?: BooleanNumber adjustLineHeightInTable?: BooleanNumber paragraphLineGapDefault?: number spaceWidthEastAsian?: BooleanNumber autoHyphenation?: BooleanNumber consecutiveHyphenLimit?: number doNotHyphenateCaps?: BooleanNumber hyphenationZone?: number}Related types: characterSpacingControlType · BooleanNumber
IEndnoteSettings
import type { IEndnoteSettings } from '@univerjs/core' · Used by INoteSettings
interface IEndnoteSettings extends IEndnoteProperties { separator?: IDocumentNoteDecoration continuationSeparator?: IDocumentNoteDecoration continuationNotice?: IDocumentNoteDecoration}Related types: IEndnoteProperties · IDocumentNoteDecoration
IFooterData
import type { IFooterData } from '@univerjs/core' · Used by IFooters
Properties of doc footer
interface IFooterData extends IReferenceSource { footerId: string body: IDocumentBody}Related types: IReferenceSource · IDocumentBody
IFootnoteSettings
import type { IFootnoteSettings } from '@univerjs/core' · Used by INoteSettings
interface IFootnoteSettings extends IFootnoteProperties { separator?: IDocumentNoteDecoration continuationSeparator?: IDocumentNoteDecoration continuationNotice?: IDocumentNoteDecoration}Related types: IFootnoteProperties · IDocumentNoteDecoration
IHeaderAndFooterBase
import type { IHeaderAndFooterBase } from '@univerjs/core' · Used by IDocumentStyle · ISectionBreak
interface IHeaderAndFooterBase { defaultHeaderId?: string defaultFooterId?: string evenPageHeaderId?: string evenPageFooterId?: string firstPageHeaderId?: string firstPageFooterId?: string useFirstPageHeaderFooter?: BooleanNumber evenAndOddHeaders?: BooleanNumber}Related types: BooleanNumber
IHeaderData
import type { IHeaderData } from '@univerjs/core' · Used by IHeaders
Properties of doc header
interface IHeaderData extends IReferenceSource { headerId: string body: IDocumentBody}Related types: IReferenceSource · IDocumentBody
IListData
import type { IListData } from '@univerjs/core' · Used by ILists
The properties of a list which describe the look and feel of bullets belonging to paragraphs associated with a list.
interface IListData { listType: string nestingLevel: INestingLevel[] counterIds?: string[] counterStarts?: Record<string, Record<number, number>>}Related types: INestingLevel
INumberUnit
import type { INumberUnit } from '@univerjs/core' · Used by ICustomColumnGroup · ITable · IColumn · ITableRow · IWidthInTableSize · ITableCellMargin · IParagraphProperties · ITableRowSize · ITableCellBorder · IIndentStart
interface INumberUnit { v: number u?: NumberUnitType fallback?: number}Related types: NumberUnitType
IParagraphStyle
import type { IParagraphStyle } from '@univerjs/core' · Used by IParagraph · IDocumentDefaultParagraphStyle · IDocStyle · INestingLevel
Properties of paragraph style
interface IParagraphStyle extends IParagraphProperties { textStyle?: ITextStyle paragraphMarkTextStyle?: ITextStyle paragraphMarkStyleId?: string}Related types: IParagraphProperties · ITextStyle
ISectionBreakBase
import type { ISectionBreakBase } from '@univerjs/core' · Used by ISectionBreak
interface ISectionBreakBase { noteProperties?: INoteProperties suppressEndnotes?: boolean charSpace?: number linePitch?: number gridType?: GridType columnProperties?: ISectionColumnProperties[] columnSeparatorType?: ColumnSeparatorType contentDirection?: TextDirection sectionType?: SectionType sectionTypeNext?: SectionType textDirection?: TextDirectionType}Related types: INoteProperties · GridType · ISectionColumnProperties · ColumnSeparatorType · TextDirection · SectionType · TextDirectionType
ITable
import type { ITable } from '@univerjs/core' · Used by ITables · IDocStyle
Properties of table
interface ITable { styleId?: string tableRows: ITableRow[] tableColumns: ITableColumn[] align: TableAlignmentType indent: INumberUnit legacyIndentAdjustment?: INumberUnit textWrap: TableTextWrapType position: ITableAnchor dist: IDistFromText size: IWidthInTableSize tableId: string cellMargin?: ITableCellMargin cellSpacing?: INumberUnit borderDefaults?: ITableBorderDefaults layout?: TableLayoutType overlap?: BooleanNumber description?: string}Related types: ITableRow · ITableColumn · TableAlignmentType · INumberUnit · TableTextWrapType · ITableAnchor · IDistFromText · IWidthInTableSize · ITableCellMargin · ITableBorderDefaults · TableLayoutType · BooleanNumber
OuterShadowAlignment
import type { OuterShadowAlignment } from '@univerjs/core' · Used by IShadowEffect
type OuterShadowAlignment = 'tl' | 't' | 'tr' | 'l' | 'ctr' | 'r' | 'bl' | 'b' | 'br'characterSpacingControlType
import { characterSpacingControlType } from '@univerjs/core' · Used by IDocumentLayout
enum characterSpacingControlType { compressPunctuation = 0, compressPunctuationAndJapaneseKana = 1, doNotCompress = 2,}ColumnSeparatorType
import { ColumnSeparatorType } from '@univerjs/core' · Used by ISectionBreakBase
The style of column separators between columns.
enum ColumnSeparatorType { COLUMN_SEPARATOR_STYLE_UNSPECIFIED = 0, // An unspecified column separator style. NONE = 1, // No column separator lines between columns. BETWEEN_EACH_COLUMN = 2, // Renders a column separator line between each column.}DocStyleType
import { DocStyleType } from '@univerjs/core' · Used by IDocStyle
enum DocStyleType { character = 0, paragraph = 1, table = 2, numbering = 3,}DocumentFlavor
import { DocumentFlavor } from '@univerjs/core' · Used by IDocStyleBase
enum DocumentFlavor { UNSPECIFIED = 0, TRADITIONAL = 1, MODERN = 2, DRAWINGML = 3,}GridType
import { GridType } from '@univerjs/core' · Used by ISectionBreakBase
enum GridType { DEFAULT = 0, LINES = 1, LINES_AND_CHARS = 2, SNAP_TO_CHARS = 3,}IDistFromText
import type { IDistFromText } from '@univerjs/core' · Used by ITable
interface IDistFromText { distT: number distB: number distL: number distR: number}IDocDrawingPosition
import type { IDocDrawingPosition } from '@univerjs/core' · Used by IDocDrawingBase
Properties of a draw object
interface IDocDrawingPosition { size: ISize positionH: IObjectPositionH positionV: IObjectPositionV angle: number flipX?: boolean flipY?: boolean}Related types: ISize · IObjectPositionH · IObjectPositionV
IDocumentNoteDecoration
import type { IDocumentNoteDecoration } from '@univerjs/core' · Used by IFootnoteSettings · IEndnoteSettings
Editable note decorations may contain tables as well as ordinary paragraphs.
interface IDocumentNoteDecoration extends IDocumentBody { tableSource?: ITables}Related types: IDocumentBody · ITables
IDocumentRenderConfig
import type { IDocumentRenderConfig } from '@univerjs/core' · Used by IDocStyleBase
the alignment mode is returned with respect to the offset of the sheet cell, because the document needs to render the layout for cells and support alignment across multiple cells (e.g., horizontal alignment of long text in overflow mode). The alignment mode of the document itself cannot meet this requirement, so an additional renderConfig needs to be added during the rendering of the document component. This means that there are two coexisting alignment modes. In certain cases, such as in an editor, conflicts may arise, requiring only one alignment mode to be retained. By removing the relevant configurations in renderConfig, the alignment mode of the sheet cell can be modified. The alternative alignment mode is applied to paragraphs within the document.
interface IDocumentRenderConfig { verticalAlign?: VerticalAlign centerAngle?: number vertexAngle?: number horizontalAlign?: HorizontalAlign isRotateNonEastAsian?: BooleanNumber background?: IColorStyle wrapStrategy?: WrapStrategy cellValueType?: CellValueType isRenderStyle?: BooleanNumber zeroWidthParagraphBreak?: BooleanNumber shapeTextOpticalVerticalAlign?: BooleanNumber lineWrapTolerance?: number}Related types: VerticalAlign · HorizontalAlign · BooleanNumber · IColorStyle · WrapStrategy · CellValueType
IDrawingParam
import type { IDrawingParam } from '@univerjs/core' · Used by IDocDrawingBase
interface IDrawingParam extends IDrawingSearch { drawingType: DrawingType transform?: Nullable<ITransformState> transforms?: Nullable<ITransformState[]> isMultiTransform?: BooleanNumber groupId?: string allowTransform?: boolean groupBaseBound?: Nullable<IGroupBaseBound> hidden?: boolean name?: string description?: string selectable?: boolean locks?: IDrawingObjectLocks}Related types: IDrawingSearch · DrawingType · ITransformState · Nullable · BooleanNumber · IGroupBaseBound · IDrawingObjectLocks
IEndnoteProperties
import type { IEndnoteProperties } from '@univerjs/core' · Used by IEndnoteSettings · INoteProperties
interface IEndnoteProperties extends Omit< IFootnoteProperties, 'position' | 'restart' | 'columnCount'> { position?: 'docEnd' | 'sectEnd' restart?: 'continuous' | 'eachSect'}IFootnoteProperties
import type { IFootnoteProperties } from '@univerjs/core' · Used by IFootnoteSettings · IEndnoteProperties · INoteProperties
Settings inherit from the document into each section; absent values do not reset inheritance.
interface IFootnoteProperties { position?: 'pageBottom' | 'beneathText' numberFormat?: string startNumber?: number restart?: 'continuous' | 'eachSect' | 'eachPage' columnCount?: number}IMargin
import type { IMargin } from '@univerjs/core' · Used by IDocStyleBase
interface IMargin { marginTop?: number marginBottom?: number marginRight?: number marginLeft?: number}INestingLevel
import type { INestingLevel } from '@univerjs/core' · Used by IListData
Contains properties describing the look and feel of a list bullet at a given level of nesting.
interface INestingLevel { paragraphProperties?: IParagraphStyle bulletAlignment: BulletAlignment glyphFormat: string followNumberWith?: FollowNumberWithType textStyle?: ITextStyle startNumber: number glyphType?: ListGlyphType glyphSymbol?: string isLegal?: boolean}Related types: IParagraphStyle · BulletAlignment · FollowNumberWithType · ITextStyle · ListGlyphType
INoteProperties
import type { INoteProperties } from '@univerjs/core' · Used by ISectionBreakBase
interface INoteProperties { footnote?: IFootnoteProperties endnote?: IEndnoteProperties}Related types: IFootnoteProperties · IEndnoteProperties
IPageBorders
import type { IPageBorders } from '@univerjs/core' · Used by IDocStyleBase
interface IPageBorders { offsetFrom?: 'page' | 'text' display?: 'allPages' | 'firstPage' | 'notFirstPage' zOrder?: 'front' | 'back' top?: IPageBorder left?: IPageBorder bottom?: IPageBorder right?: IPageBorder}Related types: IPageBorder
IParagraphProperties
import type { IParagraphProperties } from '@univerjs/core' · Used by IParagraphStyle
interface IParagraphProperties extends IIndentStart { headingId?: string namedStyleType?: NamedStyleType outlineLevel?: number defaultTabStop?: number eastAsianLineBreak?: BooleanNumber hangingPunctuation?: BooleanNumber topLinePunct?: BooleanNumber fontAlign?: ParagraphFontAlign horizontalAlign?: HorizontalAlign lineSpacing?: number direction?: TextDirection spacingRule?: SpacingRule snapToGrid?: BooleanNumber spaceAbove?: INumberUnit spaceBelow?: INumberUnit beforeAutoSpacing?: BooleanNumber afterAutoSpacing?: BooleanNumber contextualSpacing?: BooleanNumber borderBetween?: IParagraphBorder borderTop?: IParagraphBorder borderBottom?: IParagraphBorder borderLeft?: IParagraphBorder borderRight?: IParagraphBorder keepLines?: BooleanNumber keepNext?: BooleanNumber pageBreakBefore?: BooleanNumber wordWrap?: BooleanNumber widowControl?: BooleanNumber shading?: IShading suppressHyphenation?: BooleanNumber paragraphFrame?: | BooleanNumber | { horizontalSpace?: number wrap?: string verticalAnchor?: string horizontalAnchor?: string x?: string y?: string xAlign?: string yAlign?: string }}Related types: IIndentStart · NamedStyleType · BooleanNumber · ParagraphFontAlign · HorizontalAlign · TextDirection · SpacingRule · INumberUnit · IParagraphBorder · IShading
ISectionColumnProperties
import type { ISectionColumnProperties } from '@univerjs/core' · Used by ISectionBreakBase
Properties of section column
interface ISectionColumnProperties { width: number paddingEnd: number}ISize
import type { ISize } from '@univerjs/core' · Used by IDocStyleBase · IDocDrawingPosition · IAbsoluteTransform
interface ISize { width?: number height?: number}ITableAnchor
import type { ITableAnchor } from '@univerjs/core' · Used by ITable
interface ITableAnchor { positionH: IObjectPositionH positionV: IObjectPositionV}Related types: IObjectPositionH · IObjectPositionV
ITableBorderDefaults
import type { ITableBorderDefaults } from '@univerjs/core' · Used by ITable · ITableRow
Properties of cell border
interface ITableBorderDefaults { top?: ITableCellBorder left?: ITableCellBorder bottom?: ITableCellBorder right?: ITableCellBorder insideHorizontal?: ITableCellBorder insideVertical?: ITableCellBorder}Related types: ITableCellBorder
ITableCellMargin
import type { ITableCellMargin } from '@univerjs/core' · Used by ITable · ITableRow · ITableCell
interface ITableCellMargin { start: INumberUnit end: INumberUnit top: INumberUnit bottom: INumberUnit}Related types: INumberUnit
ITableColumn
import type { ITableColumn } from '@univerjs/core' · Used by ITable
interface ITableColumn { // Merge/split columns, HTML merge cells size: IWidthInTableSize}Related types: IWidthInTableSize
ITableRow
import type { ITableRow } from '@univerjs/core' · Used by IDocStyle · ITable
Properties of row of table
interface ITableRow { cellSpacing?: INumberUnit defaultCellSpacing?: INumberUnit cellMargin?: ITableCellMargin borderDefaults?: ITableBorderDefaults tableCells: ITableCell[] gridBefore?: number gridAfter?: number widthBefore?: IWidthInTableSize widthAfter?: IWidthInTableSize trHeight: ITableRowSize cantSplit?: BooleanNumber isFirstRow?: BooleanNumber repeatHeaderRow?: BooleanNumber}Related types: INumberUnit · ITableCellMargin · ITableBorderDefaults · ITableCell · IWidthInTableSize · ITableRowSize · BooleanNumber
IWidthInTableSize
import type { IWidthInTableSize } from '@univerjs/core' · Used by ITable · ITableRow · ITableColumn · ITableCell
interface IWidthInTableSize { type: TableSizeType width: INumberUnit}Related types: TableSizeType · INumberUnit
NumberUnitType
import { NumberUnitType } from '@univerjs/core' · Used by INumberUnit
enum NumberUnitType { POINT = 0, LINE = 1, CHARACTER = 2, PIXEL = 3, PERCENT = 4,}PageOrientType
import { PageOrientType } from '@univerjs/core' · Used by IDocStyleBase
Paper orientation, whether it's portrait (vertical) or landscape (horizontal)
enum PageOrientType { PORTRAIT = 0, LANDSCAPE = 1,}PositionedObjectLayoutType
import { PositionedObjectLayoutType } from '@univerjs/core' · Used by IDocDrawingBase
Controls how a positioned object participates in document text layout.
WRAP_NONE does not by itself determine whether the object is in front of or behind text. Drawing data uses
behindDoc for that stacking choice.
enum PositionedObjectLayoutType { INLINE = 0, WRAP_NONE = 1, WRAP_POLYGON = 2, WRAP_SQUARE = 3, WRAP_THROUGH = 4, WRAP_TIGHT = 5, WRAP_TOP_AND_BOTTOM = 6,}SectionType
import { SectionType } from '@univerjs/core' · Used by ISectionBreakBase
Represents how the start of the current section is positioned relative to the previous section.
enum SectionType { SECTION_TYPE_UNSPECIFIED = 0, // The section type is unspecified. CONTINUOUS = 1, // The section starts immediately after the last paragraph of the previous section. NEXT_COLUMN = 2, // The section starts in the next column, or on the next page when no column remains. NEXT_PAGE = 3, // The section starts on the next page. EVEN_PAGE = 4, // The section starts on the next even-numbered page. ODD_PAGE = 5, // The section starts on the next odd-numbered page.}TableAlignmentType
import { TableAlignmentType } from '@univerjs/core' · Used by ITable
enum TableAlignmentType { START = 0, CENTER = 1, END = 2,}TableLayoutType
import { TableLayoutType } from '@univerjs/core' · Used by ITable
enum TableLayoutType { AUTO_FIT = 0, FIXED = 1,}TableTextWrapType
import { TableTextWrapType } from '@univerjs/core' · Used by ITable
enum TableTextWrapType { NONE = 0, WRAP = 1,}TextDirectionType
import { TextDirectionType } from '@univerjs/core' · Used by ISectionBreakBase
Direction of text
enum TextDirectionType { NORMAL = 0, // Horizontal TBRL = 1, // Vertical LRTBV = 2, // Rotate Asian characters 270°}WrapTextType
import { WrapTextType } from '@univerjs/core' · Used by IDocDrawingBase
Types of wrap text
enum WrapTextType { BOTH_SIDES = 0, LEFT = 1, RIGHT = 2, LARGEST = 3,}BulletAlignment
import { BulletAlignment } from '@univerjs/core' · Used by INestingLevel
The types of alignment for a bullet.
enum BulletAlignment { BULLET_ALIGNMENT_UNSPECIFIED = 0, // The bullet alignment is unspecified. START = 1, // bullet is aligned to the start of the space allotted for rendering the bullet. Left-aligned for LTR text, right-aligned otherwise. CENTER = 2, // The bullet is aligned to the center of the space allotted for rendering the bullet. END = 3, // The bullet is aligned to the end of the space allotted for rendering the bullet. Right-aligned for LTR text, left-aligned otherwise. BOTH = 4, // The bullet is aligned such that it is equidistant from both the start and end of the space allotted for rendering the bullet.}DrawingType
import type { DrawingType } from '@univerjs/core' · Used by IDrawingParam
type DrawingType = DrawingTypeEnum | numberRelated types: DrawingTypeEnum
FollowNumberWithType
import { FollowNumberWithType } from '@univerjs/core' · Used by INestingLevel
Follow the space after the list
enum FollowNumberWithType { TAB = 0, SPACE = 1, NOTHING = 2,}IDrawingObjectLocks
import type { IDrawingObjectLocks } from '@univerjs/core' · Used by IDrawingParam
interface IDrawingObjectLocks { noSelect?: boolean noMove?: boolean noResize?: boolean noRotate?: boolean noTextEdit?: boolean noEditPoints?: boolean noChangeAspect?: boolean}IDrawingSearch
import type { IDrawingSearch } from '@univerjs/core' · Used by IDrawingParam
interface IDrawingSearch extends IDrawingSpace { drawingId: string}Related types: IDrawingSpace
IGroupBaseBound
import type { IGroupBaseBound } from '@univerjs/core' · Used by IDrawingParam
interface IGroupBaseBound { left: number top: number width: number height: number}IIndentStart
import type { IIndentStart } from '@univerjs/core' · Used by IParagraphProperties
interface IIndentStart { indentFirstLine?: INumberUnit hanging?: INumberUnit indentStart?: INumberUnit tabStops?: ITabStop[] indentEnd?: INumberUnit}Related types: INumberUnit · ITabStop
IObjectPositionH
import type { IObjectPositionH } from '@univerjs/core' · Used by ITableAnchor · IDocDrawingPosition
interface IObjectPositionH { relativeFrom: ObjectRelativeFromH align?: AlignTypeH posOffset?: number percent?: number}Related types: ObjectRelativeFromH · AlignTypeH
IObjectPositionV
import type { IObjectPositionV } from '@univerjs/core' · Used by ITableAnchor · IDocDrawingPosition
interface IObjectPositionV { relativeFrom: ObjectRelativeFromV align?: AlignTypeV posOffset?: number percent?: number}Related types: ObjectRelativeFromV · AlignTypeV
IPageBorder
import type { IPageBorder } from '@univerjs/core' · Used by IPageBorders
Page border geometry is expressed in 96-DPI layout pixels.
interface IPageBorder { style?: string width?: number padding?: number color?: IColorStyle}Related types: IColorStyle
IParagraphBorder
import type { IParagraphBorder } from '@univerjs/core' · Used by IParagraphProperties
Properties of paragraph border
interface IParagraphBorder extends IDocsBorder { padding: number style?: string}Related types: IDocsBorder
IShading
import type { IShading } from '@univerjs/core' · Used by IParagraphProperties
Properties of shading
interface IShading { backgroundColor: IColorStyle}Related types: IColorStyle
ITableCell
import type { ITableCell } from '@univerjs/core' · Used by ITableRow
Properties of table cell
interface ITableCell { margin?: ITableCellMargin rowSpan?: number columnSpan?: number backgroundColor?: IColorStyle borderLeft?: ITableCellBorder borderRight?: ITableCellBorder borderTop?: ITableCellBorder borderBottom?: ITableCellBorder size?: IWidthInTableSize tcWidthType?: 'auto' | 'dxa' | 'nil' | 'pct' tcFitText?: BooleanNumber tcHideMark?: BooleanNumber textDirection?: 'lrTb' | 'tbRl' | 'btLr' | 'lrTbV' | 'tbRlV' | 'tbLrV' vAlign?: VerticalAlignmentType}Related types: ITableCellMargin · IColorStyle · ITableCellBorder · IWidthInTableSize · BooleanNumber · VerticalAlignmentType
ITableCellBorder
import type { ITableCellBorder } from '@univerjs/core' · Used by ITableBorderDefaults · ITableCell
interface ITableCellBorder { color: IColorStyle width?: INumberUnit dashStyle?: DashStyleType tableTopBorder?: ITableCellBorder tableBottomBorder?: ITableCellBorder}Related types: IColorStyle · INumberUnit · DashStyleType
ITableRowSize
import type { ITableRowSize } from '@univerjs/core' · Used by ITableRow
interface ITableRowSize { val: INumberUnit hRule: TableRowHeightRule}Related types: INumberUnit · TableRowHeightRule
ITransformState
import type { ITransformState } from '@univerjs/core' · Used by IDrawingParam
interface ITransformState extends IAbsoluteTransform, IRotationSkewFlipTransform, ITransformStateDisableOption {}Related types: IAbsoluteTransform · IRotationSkewFlipTransform · ITransformStateDisableOption
ListGlyphType
import { ListGlyphType } from '@univerjs/core' · Used by INestingLevel
An enumeration of the supported glyph types.
enum ListGlyphType { BULLET = 0, // The glyph type is unspecified or unsupported. NONE = 1, // An empty string. DECIMAL = 2, // A number, like 1, 2, or 3. DECIMAL_ZERO = 3, // A number where single digit numbers are prefixed with a zero, like 01, 02, or 03. Numbers with more than one digit are not prefixed with a zero. UPPER_LETTER = 4, // An uppercase letter, like A, B, or C. LOWER_LETTER = 5, // A lowercase letter, like a, b, or c. UPPER_ROMAN = 6, // An uppercase Roman numeral, like I, II, or III. LOWER_ROMAN = 7, // A lowercase Roman numeral, like i, ii, or iii. ORDINAL = 8, CARDINAL_TEXT = 9, ORDINAL_TEXT = 10, HEX = 11, CHICAGO = 12, IDEOGRAPH_DIGITAL = 13, JAPANESE_COUNTING = 14, AIUEO = 15, IROHA = 16, DECIMAL_FULL_WIDTH = 17, DECIMAL_HALF_WIDTH = 18, JAPANESE_LEGAL = 19, JAPANESE_DIGITAL_TEN_THOUSAND = 20, DECIMAL_ENCLOSED_CIRCLE = 21, DECIMAL_FULL_WIDTH2 = 22, AIUEO_FULL_WIDTH = 23, IROHA_FULL_WIDTH = 24, GANADA = 25, CHOSUNG = 26, DECIMAL_ENCLOSED_FULLSTOP = 27, DECIMAL_ENCLOSED_PAREN = 28, DECIMAL_ENCLOSED_CIRCLE_CHINESE = 29, IDEOGRAPH_ENCLOSED_CIRCLE = 30, IDEOGRAPH_TRADITIONAL = 31, IDEOGRAPH_ZODIAC = 32, IDEOGRAPH_ZODIAC_TRADITIONAL = 33, TAIWANESE_COUNTING = 34, IDEOGRAPH_LEGAL_TRADITIONAL = 35, TAIWANESE_COUNTING_THOUSAND = 36, TAIWANESE_DIGITAL = 37, CHINESE_COUNTING = 38, CHINESE_LEGAL_SIMPLIFIED = 39, CHINESE_COUNTING_THOUSAND = 40, KOREAN_DIGITAL = 41, KOREAN_COUNTING = 42, KOREAN_LEGAL = 43, KOREAN_DIGITAL2 = 44, VIETNAMESE_COUNTING = 45, RUSSIAN_LOWER = 46, RUSSIAN_UPPER = 47, NUMBER_IN_DASH = 48, HEBREW1 = 49, HEBREW2 = 50, ARABIC_ALPHA = 51, ARABIC_ABJAD = 52, HINDI_VOWELS = 53, HINDI_CONSONANTS = 54, HINDI_NUMBERS = 55, HINDI_COUNTING = 56, THAI_LETTERS = 57, THAI_NUMBERS = 58, THAI_COUNTING = 59, CUSTOM = 60,}NamedStyleType
import { NamedStyleType } from '@univerjs/core' · Used by IParagraphProperties
Types of name style
enum NamedStyleType { NAMED_STYLE_TYPE_UNSPECIFIED = 0, // The type of named style is unspecified. NORMAL_TEXT = 1, // Normal text. TITLE = 2, // Title. SUBTITLE = 3, // Subtitle. HEADING_1 = 4, // Heading 1. HEADING_2 = 5, // Heading 2. HEADING_3 = 6, // Heading 3. HEADING_4 = 7, // Heading 4. HEADING_5 = 8, // Heading 5.}ParagraphFontAlign
import type { ParagraphFontAlign } from '@univerjs/core' · Used by IParagraphProperties
Vertical alignment of text runs inside a paragraph line box.
This is the normalized form of DrawingML fontAlgn.
type ParagraphFontAlign = 'auto' | 'top' | 'center' | 'baseline' | 'bottom'SpacingRule
import { SpacingRule } from '@univerjs/core' · Used by IParagraphProperties
enum SpacingRule { AUTO = 0, AT_LEAST = 1, EXACT = 2,}TableSizeType
import { TableSizeType } from '@univerjs/core' · Used by IWidthInTableSize
enum TableSizeType { UNSPECIFIED = 0, SPECIFIED = 1,}AlignTypeH
import { AlignTypeH } from '@univerjs/core' · Used by IObjectPositionH
enum AlignTypeH { CENTER = 0, INSIDE = 1, LEFT = 2, OUTSIDE = 3, RIGHT = 4, BOTH = 5, DISTRIBUTE = 6,}AlignTypeV
import { AlignTypeV } from '@univerjs/core' · Used by IObjectPositionV
enum AlignTypeV { BOTTOM = 0, CENTER = 1, INSIDE = 2, OUTSIDE = 3, TOP = 4,}DashStyleType
import { DashStyleType } from '@univerjs/core' · Used by ITableCellBorder · IDocsBorder
The kinds of dashes with which linear geometry can be rendered.
enum DashStyleType { DASH_STYLE_UNSPECIFIED = 0, // Unspecified dash style. SOLID = 1, // Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'. This is the default dash style. DOT = 2, // Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'. DASH = 3, // Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.}DrawingTypeEnum
import { DrawingTypeEnum } from '@univerjs/core' · Used by DrawingType
Types of drawings, used to distinguish between images, shapes, charts, tables, SmartArt, videos, DrawingGroup, Unit, Dom, etc.
enum DrawingTypeEnum { UNRECOGNIZED = -1, DRAWING_IMAGE = 0, DRAWING_SHAPE = 1, DRAWING_CHART = 2, DRAWING_TABLE = 3, DRAWING_SMART_ART = 4, DRAWING_VIDEO = 5, DRAWING_GROUP = 6, DRAWING_UNIT = 7, DRAWING_DOM = 8, DRAWING_BLOCK = 9, DRAWING_SLICER = 10, DRAWING_TIMELINE = 11, DRAWING_OLE = 12,}IAbsoluteTransform
import type { IAbsoluteTransform } from '@univerjs/core' · Used by ITransformState
interface IAbsoluteTransform extends ISize, IOffset, IScale {}Related types: ISize · IOffset · IScale
IDocsBorder
import type { IDocsBorder } from '@univerjs/core' · Used by IParagraphBorder
Properties of doc border
interface IDocsBorder { color: IColorStyle width: number dashStyle: DashStyleType}Related types: IColorStyle · DashStyleType
IDrawingSpace
import type { IDrawingSpace } from '@univerjs/core' · Used by IDrawingSearch
interface IDrawingSpace { unitId: string subUnitId: string}IRotationSkewFlipTransform
import type { IRotationSkewFlipTransform } from '@univerjs/core' · Used by ITransformState
interface IRotationSkewFlipTransform { angle?: number skewX?: number skewY?: number flipX?: boolean flipY?: boolean}ITabStop
import type { ITabStop } from '@univerjs/core' · Used by IIndentStart
A tab stop within a paragraph.
interface ITabStop { offset: number alignment: TabStopAlignment leader?: TabStopLeader clear?: boolean}Related types: TabStopAlignment · TabStopLeader
ITransformStateDisableOption
import type { ITransformStateDisableOption } from '@univerjs/core' · Used by ITransformState
interface ITransformStateDisableOption { rotateEnabled?: boolean resizeEnabled?: boolean borderEnabled?: boolean}ObjectRelativeFromH
import { ObjectRelativeFromH } from '@univerjs/core' · Used by IObjectPositionH
enum ObjectRelativeFromH { PAGE = 0, COLUMN = 1, CHARACTER = 2, MARGIN = 3, INSIDE_MARGIN = 4, OUTSIDE_MARGIN = 5, LEFT_MARGIN = 6, RIGHT_MARGIN = 7,}ObjectRelativeFromV
import { ObjectRelativeFromV } from '@univerjs/core' · Used by IObjectPositionV
enum ObjectRelativeFromV { PAGE = 0, PARAGRAPH = 1, LINE = 2, MARGIN = 3, TOP_MARGIN = 4, BOTTOM_MARGIN = 5, INSIDE_MARGIN = 6, OUTSIDE_MARGIN = 7,}TableRowHeightRule
import { TableRowHeightRule } from '@univerjs/core' · Used by ITableRowSize
enum TableRowHeightRule { AUTO = 0, AT_LEAST = 1, EXACT = 2,}VerticalAlignmentType
import { VerticalAlignmentType } from '@univerjs/core' · Used by ITableCell
The content alignments for a Shape or TableCell. The supported alignments correspond to predefined text anchoring types from the ECMA-376 standard.
enum VerticalAlignmentType { CONTENT_ALIGNMENT_UNSPECIFIED = 0, // An unspecified content alignment. The content alignment is inherited from the parent if one exists. BOTH = 1, TOP = 2, // An alignment that aligns the content to the top of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 't'. CENTER = 3, // An alignment that aligns the content to the middle of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 'ctr'. BOTTOM = 4, // An alignment that aligns the content to the bottom of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 'b'.}IOffset
import type { IOffset } from '@univerjs/core' · Used by IAbsoluteTransform
interface IOffset { left?: number top?: number}IScale
import type { IScale } from '@univerjs/core' · Used by IAbsoluteTransform
interface IScale { scaleX?: number scaleY?: number}How is this guide?