@birchui/document
Document Editor: createDocumentEditor, the document JSON model, DOCX and PDF conversion, review and collaboration.
Key exports: createDocumentEditor, DocumentEditorOptions, DocumentEditorApi, DocumentEditorEvents
Guides: Accessibility conformance report, Accessibility, Document Editor API and events, Collaboration, Comments, Compare and version history
@birchui/document#
acceptAllRevisionsfunction#
function acceptAllRevisions(doc: DocNodeJSON): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/compare.ts:677
breakGapsfunction#
function breakGaps(breaks: readonly LayoutBreak[], pageStride: number): number[]| Parameter | Type | Description |
|---|---|---|
breaks | readonly LayoutBreak[] | — |
pageStride | number | — |
Defined in packages/document/src/layout/paginate.ts:630
buildDocxPartsfunction#
function buildDocxParts(input: DocumentData, options: DocxWriteOptions = {}): ZipInputFile[]| Parameter | Type | Description |
|---|---|---|
input | DocumentData | — |
optionsoptional | DocxWriteOptions | — |
Defined in packages/document/src/docx/writer.ts:1505
checkAccessibilityfunction#
function checkAccessibility(doc: DocNodeJSON, options: { fontSize?: number; rules?: readonly AccessibilityRule[] } = {}): AccessibilityIssue[]| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
optionsoptional | { fontSize?: number; rules?: readonly AccessibilityRule[] } | — |
Defined in packages/document/src/model/accessibility.ts:238
clearRegisteredFontsfunction#
function clearRegisteredFonts(): voidDefined in packages/document/src/layout/pdf/font-substitution.ts:89
combineDocumentsfunction#
function combineDocuments(original: DocNodeJSON, first: DocNodeJSON, second: DocNodeJSON, options: CombineOptions = {}): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
original | DocNodeJSON | — |
first | DocNodeJSON | — |
second | DocNodeJSON | — |
optionsoptional | CombineOptions | — |
Defined in packages/document/src/model/combine.ts:78
compareDocumentsfunction#
function compareDocuments(original: DocNodeJSON, revised: DocNodeJSON, options: CompareOptions & { idPrefix?: string } = {}): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
original | DocNodeJSON | — |
revised | DocNodeJSON | — |
optionsoptional | CompareOptions & { idPrefix?: string } | — |
Defined in packages/document/src/model/compare.ts:593
contentBoxfunction#
function contentBox(setup: PageSetup): { width: number; height: number }| Parameter | Type | Description |
|---|---|---|
setup | PageSetup | — |
Defined in packages/document/src/model/page-setup.ts:45
contrastRatiofunction#
function contrastRatio(foreground: string, background: string): number | null| Parameter | Type | Description |
|---|---|---|
foreground | string | — |
background | string | — |
Defined in packages/document/src/model/accessibility.ts:66
countRevisionsfunction#
function countRevisions(doc: DocNodeJSON): number| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/compare.ts:656
createAuthorityBackendfunction#
function createAuthorityBackend(authority: CollabAuthority, start: CollabBackendStart = {}): CollabBackend| Parameter | Type | Description |
|---|---|---|
authority | CollabAuthority | — |
startoptional | CollabBackendStart | — |
Defined in packages/document/src/editor/collab/backend.ts:146
createBroadcastChannelBackendfunction#
function createBroadcastChannelBackend(options: CollabBroadcastBackendOptions): CollabBackend| Parameter | Type | Description |
|---|---|---|
options | CollabBroadcastBackendOptions | — |
Defined in packages/document/src/editor/collab/broadcast-backend.ts:98
createCollabAuthorityfunction#
function createCollabAuthority(options: CollabAuthorityOptions = {}): CollabAuthority| Parameter | Type | Description |
|---|---|---|
optionsoptional | CollabAuthorityOptions | — |
Defined in packages/document/src/editor/collab/authority.ts:409
createCollabDocumentfunction#
function createCollabDocument(document?: DocumentInput | null, limits?: Partial<CollabDocumentLimits>): CollabDocument| Parameter | Type | Description |
|---|---|---|
documentoptional | DocumentInput | null | — |
limitsoptional | Partial<CollabDocumentLimits> | — |
Defined in packages/document/src/editor/collab/document-state.ts:291
createCollabIdfunction#
function createCollabId(prefix = '', random?: () => number): string| Parameter | Type | Description |
|---|---|---|
prefixoptional | unknown | — |
randomoptional | () => number | — |
Defined in packages/document/src/editor/collab/ids.ts:19
createCollabProviderfunction#
function createCollabProvider(backend: CollabBackend, options: CollabBackendProviderOptions = {}): CollabBackendProvider| Parameter | Type | Description |
|---|---|---|
backend | CollabBackend | — |
optionsoptional | CollabBackendProviderOptions | — |
Defined in packages/document/src/editor/collab/backend.ts:37
createDocumentEditorfunction#
function createDocumentEditor(container: HTMLElement, options: DocumentEditorOptions = {}): DocumentEditorApi| Parameter | Type | Description |
|---|---|---|
container | HTMLElement | — |
optionsoptional | DocumentEditorOptions | — |
Defined in packages/document/src/editor/document-editor.ts:57
createIndexedDbOfflineStorefunction#
function createIndexedDbOfflineStore(options: { key: string; database?: string }): CollabOfflineStoreKeeps unsent edits in IndexedDB under key, which should name the document and the signed-in person, so a tab
that closes while offline finds them again.
| Parameter | Type | Description |
|---|---|---|
options | { key: string; database?: string } | — |
Defined in packages/document/src/editor/collab/offline-store.ts:30
createLoopbackHubfunction#
function createLoopbackHub(options: LoopbackHubOptions = {}): LoopbackHub| Parameter | Type | Description |
|---|---|---|
optionsoptional | LoopbackHubOptions | — |
Defined in packages/document/src/editor/collab/loopback.ts:283
createMemoryOfflineStorefunction#
function createMemoryOfflineStore(): CollabOfflineStoreDefined in packages/document/src/editor/collab/offline-store.ts:6
createSocketBackendfunction#
function createSocketBackend(options: CollabSocketBackendOptions): CollabBackend| Parameter | Type | Description |
|---|---|---|
options | CollabSocketBackendOptions | — |
Defined in packages/document/src/editor/collab/socket-backend.ts:131
createWireBackendfunction#
function createWireBackend(link: CollabWireLink, options: CollabWireBackendOptions = {}): CollabBackend| Parameter | Type | Description |
|---|---|---|
link | CollabWireLink | — |
optionsoptional | CollabWireBackendOptions | — |
Defined in packages/document/src/editor/collab/wire.ts:37
createWireEndpointfunction#
function createWireEndpoint(authority: CollabAuthority, send: (message: CollabWireMessage) => void): CollabWireEndpoint| Parameter | Type | Description |
|---|---|---|
authority | CollabAuthority | — |
send | (message: CollabWireMessage) => void | — |
Defined in packages/document/src/editor/collab/wire.ts:167
describeChartfunction#
function describeChart(model: ChartModel): string| Parameter | Type | Description |
|---|---|---|
model | ChartModel | — |
Defined in packages/document/src/model/chart.ts:339
detectFileTypefunction#
function detectFileType(input: FileTypeInput): FileTypeInfoThe type of an embedded file. The ProgID is asked first, then the file name, then the content type and the extension of the part, and last the leading bytes.
| Parameter | Type | Description |
|---|---|---|
input | FileTypeInput | — |
Defined in packages/document/src/docx/file-type.ts:352
docToDocumentfunction#
function docToDocument(input: Uint8Array | ArrayBuffer, options: DocReadOptions = {}): DocumentDataReads a Word 97–2003 binary document (.doc). Every failure is a DocFormatError; hostile
or damaged input never reads outside the file and stays within limits.
| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | — |
optionsoptional | DocReadOptions | — |
Defined in packages/document/src/doc/reader.ts:865
documentSectionsfunction#
function documentSections(data: Pick<DocumentData, 'content' | 'page'> & Partial<DocumentData>): DocumentSection[]| Parameter | Type | Description |
|---|---|---|
data | Pick<DocumentData, 'content' | 'page'> & Partial<DocumentData> | — |
Defined in packages/document/src/model/sections.ts:10
documentTextfunction#
function documentText(doc: DocNodeJSON, options: { skipDeleted?: boolean } = {}): string| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
optionsoptional | { skipDeleted?: boolean } | — |
Defined in packages/document/src/model/json.ts:257
documentToDocxfunction#
function documentToDocx(data: DocumentData, options: DocxWriteOptions = {}): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
data | DocumentData | — |
optionsoptional | DocxWriteOptions | — |
Defined in packages/document/src/docx/writer.ts:1545
documentToHtmlfunction#
function documentToHtml(input: DocumentInput, options: HtmlDocumentOptions = {}): string| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | HtmlDocumentOptions | — |
Defined in packages/document/src/formats/html.ts:964
documentToMarkdownfunction#
function documentToMarkdown(input: DocumentInput, options: MarkdownOptions = {}): string| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | MarkdownOptions | — |
Defined in packages/document/src/formats/markdown.ts:261
documentToOdtfunction#
function documentToOdt(input: DocumentInput): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
Defined in packages/document/src/formats/odt.ts:452
documentToPdffunction#
function documentToPdf(input: DocumentInput, options: DocumentPdfOptions = {}): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | DocumentPdfOptions | — |
Defined in packages/document/src/layout/pdf/document-layout.ts:471
docxToDocumentfunction#
function docxToDocument(input: Uint8Array | ArrayBuffer | Blob, options: DocxReadOptions = {}): Promise<DocumentData>| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | Blob | — |
optionsoptional | DocxReadOptions | — |
Defined in packages/document/src/docx/reader.ts:774
embeddedObjectFilefunction#
function embeddedObjectFile(attrs: Attrs): EmbeddedObjectFile| Parameter | Type | Description |
|---|---|---|
attrs | Attrs | — |
Defined in packages/document/src/docx/embedded.ts:107
embeddedObjectNodefunction#
function embeddedObjectNode(input: EmbeddedObjectInput): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
input | EmbeddedObjectInput | — |
Defined in packages/document/src/docx/embedded.ts:85
embeddedObjectTypefunction#
function embeddedObjectType(attrs: Attrs): FileTypeInfoThe file type of an embedded_object node, from its ProgID, file name, content type and bytes, in that order.
| Parameter | Type | Description |
|---|---|---|
attrs | Attrs | — |
Defined in packages/document/src/docx/embedded.ts:63
emptyDocumentfunction#
function emptyDocument(): DocumentDataDefined in packages/document/src/model/json.ts:37
fileIconSvgfunction#
function fileIconSvg(type: Pick<FileTypeInfo, 'kind' | 'badge'>, options: FileIconSvgOptions = {}): stringA standalone SVG picture of the icon of a file type, with the badge as text.
| Parameter | Type | Description |
|---|---|---|
type | Pick<FileTypeInfo, 'kind' | 'badge'> | — |
optionsoptional | FileIconSvgOptions | — |
Defined in packages/document/src/docx/file-icon.ts:143
fileTypeLabelfunction#
function fileTypeLabel(label: FileTypeLabel, translate?: FileTypeTranslate): stringThe name of a file type as it reads inside a sentence: "PDF document", "image".
| Parameter | Type | Description |
|---|---|---|
label | FileTypeLabel | — |
translateoptional | FileTypeTranslate | — |
Defined in packages/document/src/docx/file-type.ts:420
findMatchesfunction#
function findMatches(blocks: readonly SearchBlock[], query: string, options: FindOptions = {}): SearchMatch[]| Parameter | Type | Description |
|---|---|---|
blocks | readonly SearchBlock[] | — |
query | string | — |
optionsoptional | FindOptions | — |
Defined in packages/document/src/model/search.ts:96
fontFamilyStackfunction#
function fontFamilyStack(fontFamily: string): stringA CSS font-family list that puts the metric-compatible substitutes right after each requested family.
| Parameter | Type | Description |
|---|---|---|
fontFamily | string | — |
Defined in packages/document/src/layout/pdf/font-substitution.ts:48
fontSubstitutesfunction#
function fontSubstitutes(family: string): readonly string[]| Parameter | Type | Description |
|---|---|---|
family | string | — |
Defined in packages/document/src/layout/pdf/font-substitution.ts:36
formatBibliographyEntryfunction#
function formatBibliographyEntry(source: BibliographySource, style: CitationStyle): CitationRun[]| Parameter | Type | Description |
|---|---|---|
source | BibliographySource | — |
style | CitationStyle | — |
Defined in packages/document/src/model/citations.ts:453
formatCitationfunction#
function formatCitation(request: CitationRequest, sources: readonly BibliographySource[], style: CitationStyle): string | null| Parameter | Type | Description |
|---|---|---|
request | CitationRequest | — |
sources | readonly BibliographySource[] | — |
style | CitationStyle | — |
Defined in packages/document/src/model/citations.ts:248
formatDatePicturefunction#
function formatDatePicture(date: Date, picture: string): string| Parameter | Type | Description |
|---|---|---|
date | Date | — |
picture | string | — |
Defined in packages/document/src/model/fields.ts:186
formatNumberfunction#
function formatNumber(value: number, format: string): string| Parameter | Type | Description |
|---|---|---|
value | number | — |
format | string | — |
Defined in packages/document/src/model/numbering.ts:239
hostBroadcastChannelfunction#
function hostBroadcastChannel(authority: CollabAuthority, channel: CollabBroadcastPort | string, options: { hostTimeout?: number } = {}): { close(): void }| Parameter | Type | Description |
|---|---|---|
authority | CollabAuthority | — |
channel | CollabBroadcastPort | string | — |
optionsoptional | { hostTimeout?: number } | — |
Defined in packages/document/src/editor/collab/broadcast-backend.ts:102
htmlToDocumentfunction#
function htmlToDocument(html: string): DocumentData| Parameter | Type | Description |
|---|---|---|
html | string | — |
Defined in packages/document/src/formats/html.ts:690
imageSourceKindfunction#
function imageSourceKind(value: unknown): ImageSourceKind| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/document/src/model/url.ts:79
inkSvgfunction#
function inkSvg(stroke: InkStroke, width: number, height: number): string| Parameter | Type | Description |
|---|---|---|
stroke | InkStroke | — |
width | number | — |
height | number | — |
Defined in packages/document/src/model/ink.ts:105
layoutDocumentfunction#
function layoutDocument(input: DocumentInput, options: DocumentPdfOptions = {}): { layout: PdfDocumentLayout; warnings: string[]; missingFonts: string[] }| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | DocumentPdfOptions | — |
Defined in packages/document/src/layout/pdf/document-layout.ts:105
layoutToPdffunction#
function layoutToPdf(layout: PdfDocumentLayout, options: PdfWriteOptions = {}): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
layout | PdfDocumentLayout | — |
optionsoptional | PdfWriteOptions | — |
Defined in packages/document/src/layout/pdf/writer.ts:722
markdownToDocumentfunction#
function markdownToDocument(markdown: string): DocumentData| Parameter | Type | Description |
|---|---|---|
markdown | string | — |
Defined in packages/document/src/formats/markdown.ts:748
markMovesfunction#
function markMoves(doc: DocNodeJSON): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/compare.ts:652
mergeContentfunction#
function mergeContent(doc: DocNodeJSON, values: MergeValues, options: MergeOptions = {}): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
values | MergeValues | — |
optionsoptional | MergeOptions | — |
Defined in packages/document/src/model/merge.ts:520
mergeDocumentfunction#
function mergeDocument(data: DocumentData, values: MergeValues, options: MergeOptions = {}): DocumentData| Parameter | Type | Description |
|---|---|---|
data | DocumentData | — |
values | MergeValues | — |
optionsoptional | MergeOptions | — |
Defined in packages/document/src/model/merge.ts:525
mergeFieldNamesfunction#
function mergeFieldNames(doc: DocNodeJSON): string[]| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/merge.ts:537
metafileToSvgfunction#
function metafileToSvg(bytes: Uint8Array, options: MetafileOptions = {}): string | null| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
optionsoptional | MetafileOptions | — |
Defined in packages/document/src/docx/metafile.ts:584
multiplyMatrixfunction#
function multiplyMatrix(first: PdfMatrix, second: PdfMatrix): PdfMatrixDefined in packages/document/src/layout/pdf/layout-tree.ts:204
normalizeChartfunction#
function normalizeChart(value: unknown): ChartModel | null| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/document/src/model/chart.ts:20
normalizeDocumentfunction#
function normalizeDocument(input: DocumentInput | null | undefined): DocumentData| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | null | undefined | — |
Defined in packages/document/src/model/json.ts:155
normalizePageSetupfunction#
function normalizePageSetup(input: Partial<PageSetup> | undefined, base: PageSetup = DEFAULT_PAGE_SETUP): PageSetupDefined in packages/document/src/model/page-setup.ts:109
normalizeStrokefunction#
function normalizeStroke(value: unknown): InkStroke | null| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/document/src/model/ink.ts:22
numberingLabelsfunction#
function numberingLabels(document: Pick<DocumentData, 'content'> & Partial<DocumentData>): NumberingLabel[]| Parameter | Type | Description |
|---|---|---|
document | Pick<DocumentData, 'content'> & Partial<DocumentData> | — |
Defined in packages/document/src/model/numbering.ts:639
odtToDocumentfunction#
function odtToDocument(input: Uint8Array | ArrayBuffer | Blob, options: { limits?: Partial<ZipLimits> } = {}): Promise<DocumentData>| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | Blob | — |
optionsoptional | { limits?: Partial<ZipLimits> } | — |
Defined in packages/document/src/formats/odt.ts:831
outlineOffunction#
function outlineOf(doc: DocNodeJSON): OutlineEntry[]| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/json.ts:307
pageDimensionsfunction#
function pageDimensions(setup: PageSetup): { width: number; height: number }| Parameter | Type | Description |
|---|---|---|
setup | PageSetup | — |
Defined in packages/document/src/model/page-setup.ts:38
paginatefunction#
function paginate(blocks: readonly LayoutBlock[], options: PaginateOptions): PaginationResult| Parameter | Type | Description |
|---|---|---|
blocks | readonly LayoutBlock[] | — |
options | PaginateOptions | — |
Defined in packages/document/src/layout/paginate.ts:617
parseFieldInstructionfunction#
function parseFieldInstruction(instruction: string): ParsedField| Parameter | Type | Description |
|---|---|---|
instruction | string | — |
Defined in packages/document/src/model/fields.ts:122
readDocxfunction#
function readDocx(input: Uint8Array | ArrayBuffer | Blob, options: DocxReadOptions = {}): Promise<DocxReadResult>| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | Blob | — |
optionsoptional | DocxReadOptions | — |
Defined in packages/document/src/docx/reader.ts:447
registeredFontsfunction#
function registeredFonts(): readonly PdfFontSource[]Defined in packages/document/src/layout/pdf/font-substitution.ts:85
registerFontsfunction#
function registerFonts(fonts: readonly PdfFontSource[]): voidMakes font files available to every PDF written afterwards, in the browser and on a server, in addition to the
fonts passed with a single call. Registering a face again replaces it.
| Parameter | Type | Description |
|---|---|---|
fonts | readonly PdfFontSource[] | — |
Defined in packages/document/src/layout/pdf/font-substitution.ts:70
rejectAllRevisionsfunction#
function rejectAllRevisions(doc: DocNodeJSON): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/compare.ts:681
renderChartSvgfunction#
function renderChartSvg(input: ChartModel, width: number, height: number): string| Parameter | Type | Description |
|---|---|---|
input | ChartModel | — |
width | number | — |
height | number | — |
Defined in packages/document/src/model/chart.ts:345
renderDocumentPdffunction#
function renderDocumentPdf(input: DocumentInput, options: DocumentPdfOptions = {}): Promise<DocumentPdfResult>| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | DocumentPdfOptions | — |
Defined in packages/document/src/layout/pdf/document-layout.ts:457
rotationMatrixfunction#
function rotationMatrix(degrees: number, centerX: number, centerY: number): PdfMatrix| Parameter | Type | Description |
|---|---|---|
degrees | number | — |
centerX | number | — |
centerY | number | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:197
rtfToDocumentfunction#
function rtfToDocument(input: string | Uint8Array | ArrayBuffer): DocumentData| Parameter | Type | Description |
|---|---|---|
input | string | Uint8Array | ArrayBuffer | — |
Defined in packages/document/src/formats/rtf.ts:700
sanitizeHreffunction#
function sanitizeHref(value: unknown, linkSchemes?: readonly string[]): string | nullThe address when it may be followed, otherwise null. linkSchemes extends the allow-list.
| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
linkSchemesoptional | readonly string[] | — |
Defined in packages/document/src/model/url.ts:56
sanitizeImageSrcfunction#
function sanitizeImageSrc(value: unknown): string| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/document/src/model/url.ts:92
updateFieldsfunction#
function updateFields(input: DocumentData, context: FieldContext = {}): DocumentData| Parameter | Type | Description |
|---|---|---|
input | DocumentData | — |
contextoptional | FieldContext | — |
Defined in packages/document/src/model/fields.ts:419
validateDocxPackagefunction#
function validateDocxPackage(bytes: Uint8Array | ArrayBuffer, options: { limits?: Partial<ZipLimits> } = {}): Promise<DocxValidationResult>| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | ArrayBuffer | — |
optionsoptional | { limits?: Partial<ZipLimits> } | — |
Defined in packages/document/src/docx/validate.ts:940
validateDocxPartsfunction#
function validateDocxParts(files: Map<string, Uint8Array>): DocxValidationResult| Parameter | Type | Description |
|---|---|---|
files | Map<string, Uint8Array> | — |
Defined in packages/document/src/docx/validate.ts:878
wordCountfunction#
function wordCount(doc: DocNodeJSON): WordCount| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/json.ts:274
writePdffunction#
function writePdf(layout: PdfDocumentLayout, options: PdfWriteOptions = {}): Promise<PdfWriteResult>| Parameter | Type | Description |
|---|---|---|
layout | PdfDocumentLayout | — |
optionsoptional | PdfWriteOptions | — |
Defined in packages/document/src/layout/pdf/writer.ts:613
DocFormatErrorclass#
class DocFormatError extends Error
new DocFormatError(readonly code: DocFormatCode, message: string)| Member | Type | Description |
|---|---|---|
namereadonly | "DocFormatError" | — |
codereadonly | DocFormatCode | — |
Defined in packages/document/src/doc/errors.ts:4
DocumentFormatErrorclass#
class DocumentFormatError extends Error
new DocumentFormatError(readonly code: DocumentFormatCode, message: string)| Member | Type | Description |
|---|---|---|
namereadonly | "DocumentFormatError" | — |
codereadonly | DocumentFormatCode | — |
Defined in packages/document/src/docx/errors.ts:42
FileOpenErrorclass#
class FileOpenError extends Error
new FileOpenError(readonly code: FileErrorCode, message: string)| Member | Type | Description |
|---|---|---|
namereadonly | "FileOpenError" | — |
codereadonly | FileErrorCode | — |
Defined in packages/document/src/editor/file/formats.ts:5
PdfFontErrorclass#
class PdfFontError extends Error
new PdfFontError(readonly families: readonly string[])Defined in packages/document/src/layout/pdf/font-substitution.ts:97
ZipLimitErrorclass#
class ZipLimitError extends Error
new ZipLimitError(code: ZipLimitCode, message: string, detail: { limit: number; actual: number; entryName?: string })| Member | Type | Description |
|---|---|---|
codereadonly | ZipLimitCode | — |
limitreadonly | number | — |
actualreadonly | number | — |
entryNamereadonly | string | undefined | — |
Defined in packages/document/src/docx/errors.ts:23
ACCESSIBILITY_RULESconst#
const ACCESSIBILITY_RULES: readonly AccessibilityRule[]Defined in packages/document/src/model/accessibility.ts:6
CHART_PALETTEconst#
const CHART_PALETTE: string[]Defined in packages/document/src/model/chart.ts:5
CHART_TYPESconst#
const CHART_TYPES: readonly ChartType[]Defined in packages/document/src/model/chart.ts:3
CITATION_STYLESconst#
const CITATION_STYLES: readonly CitationStyle[]Defined in packages/document/src/model/citations.ts:3
DEFAULT_COLLAB_LIMITSconst#
const DEFAULT_COLLAB_LIMITS: Readonly<CollabDocumentLimits>Defined in packages/document/src/editor/collab/document-state.ts:20
DEFAULT_DOC_LIMITSconst#
const DEFAULT_DOC_LIMITS: Readonly<DocLimits>Defined in packages/document/src/doc/errors.ts:28
DEFAULT_PAGE_SETUPconst#
const DEFAULT_PAGE_SETUP: PageSetupDefined in packages/document/src/model/page-setup.ts:17
DEFAULT_TOOLBARconst#
const DEFAULT_TOOLBAR: readonly ToolbarItemId[]Defined in packages/document/src/editor/toolbar-data.ts:3
DEFAULT_ZIP_LIMITSconst#
const DEFAULT_ZIP_LIMITS: Readonly<ZipLimits>Defined in packages/document/src/docx/errors.ts:16
DOCUMENT_EVENT_NAMESconst#
const DOCUMENT_EVENT_NAMES: readonly (keyof DocumentEditorEvents)[]Defined in packages/document/src/editor/document-editor.ts:34
documentEditorDefinitionconst#
const documentEditorDefinition: WidgetDefinition<DocumentEditorOptions | undefined, { ready: any; historyChange: any; selectionChange: any; embeddedObjectOpen: any; contentChange: any; pageCountChange: any; commentsChange: any; trackedChangesChange: any; readOnlyChange: any; transaction: any; focus: any; blur: any; autosaveStart: any; autosaveEnd: any; autosaveError: any; stylesChange: any; autocorrectChange: any; formChange: any; fieldsUpdate: any; revisionsChange: any; markupModeChange: any; snapshotsChange: any; collabStatus: any; collabConnection: any; collabRejected: any; collabRestored: any; presenceChange: any; locksChange: any; ribbonTabChange: any; viewModeChange: any; layoutComplete: any; fontsMissing: any; fileOpened: any; templateOpened: any; fileSaved: any; fileError: any; fileMenuChange: any; sourcesChange: any; drawToolChange: any; readAloudChange: any; }, DocumentEditorApi>Defined in packages/document/src/editor/document-editor.ts:568
documentStylesconst#
const documentStyles: stringDefined in packages/document/src/styles.ts:564
DOCX_MIMEconst#
const DOCX_MIME: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'Defined in packages/document/src/docx/write-parts.ts:74
FONT_SUBSTITUTIONSconst#
const FONT_SUBSTITUTIONS: Readonly<Record<string, readonly string[]>>Fonts with the same advance widths as the font they replace, so text set in the substitute breaks at the same places. Carlito and Caladea match Calibri and Cambria; the Liberation and Croscore families match Arial, Times New Roman and Courier New; Gelasio matches Georgia and Selawik matches Segoe UI.
Defined in packages/document/src/layout/pdf/font-substitution.ts:8
INK_COLORSconst#
const INK_COLORS: string[]Defined in packages/document/src/model/ink.ts:15
INK_WIDTHSconst#
const INK_WIDTHS: number[]Defined in packages/document/src/model/ink.ts:16
ODT_MIMEconst#
const ODT_MIME: "application/vnd.oasis.opendocument.text" = 'application/vnd.oasis.opendocument.text'Defined in packages/document/src/formats/odt.ts:26
PAGE_SIZESconst#
const PAGE_SIZES: Readonly<Record<PageSizeName, { width: number; height: number }>>Defined in packages/document/src/model/page-setup.ts:3
PARAGRAPH_STYLESconst#
const PARAGRAPH_STYLES: readonly ParagraphStyleDefinition[]Defined in packages/document/src/model/paragraph-styles.ts:24
SHORTCUTSconst#
const SHORTCUTS: readonly { keys: string; label: string }[]Defined in packages/document/src/editor/keymap.ts:27
SOURCE_TYPESconst#
const SOURCE_TYPES: readonly ["Book", "BookSection", "JournalArticle", "ArticleInAPeriodical", "ConferenceProceedings", "Report", "InternetSite", "DocumentFromInternetSite", "Misc"]Defined in packages/document/src/model/citations.ts:5
WORD_SHORTCUTSconst#
const WORD_SHORTCUTS: readonly { keys: string; label: string }[]Defined in packages/document/src/editor/editing/shortcuts.ts:10
AbstractNumberinginterface#
interface AbstractNumbering| Property | Type | Description |
|---|---|---|
id | number | — |
nameoptional | string | — |
multiLevelTypeoptional | string | — |
styleLinkoptional | string | — |
numStyleLinkoptional | string | — |
levels | NumberingLevel[] | — |
Defined in packages/document/src/model/numbering.ts:31
AccessibilityApiinterface#
interface AccessibilityApi| Member | Type | Description |
|---|---|---|
checkAccessibility() | (rules?: readonly AccessibilityRule[]) => AccessibilityIssue[] | The accessibility issues of the document, in document order. |
Defined in packages/document/src/editor/accessibility/index.ts:14
AccessibilityIssueinterface#
interface AccessibilityIssue| Property | Type | Description |
|---|---|---|
id | string | — |
rule | AccessibilityRule | — |
from | number | Where the object, heading, table or text starts and ends in the document. |
to | number | — |
text | string | The text of the heading or run, the first cells of the table, or the kind of object. |
leveloptional | number | Skipped heading: the level found and the deepest level allowed there. |
expectedoptional | number | — |
coloroptional | string | Low contrast: the two colours and their ratio. |
backgroundoptional | string | — |
ratiooptional | number | — |
Defined in packages/document/src/model/accessibility.ts:13
AddCommentOptionsinterface#
interface AddCommentOptions| Property | Type | Description |
|---|---|---|
authoroptional | string | — |
dateoptional | string | — |
mentionsoptional | readonly CommentMention[] | — |
Defined in packages/document/src/types.ts:877
AnnouncementOptionsinterface#
interface AnnouncementOptions| Property | Type | Description |
|---|---|---|
formattingoptional | boolean | — |
positionoptional | boolean | — |
reviewoptional | boolean | — |
Defined in packages/document/src/types.ts:393
AuthorInfointerface#
interface AuthorInfoDefined in packages/document/src/types.ts:799
AutocorrectOptionsinterface#
interface AutocorrectOptions| Property | Type | Description |
|---|---|---|
smartQuotesoptional | boolean | — |
dashesoptional | boolean | — |
symbolsoptional | boolean | — |
fractionsoptional | boolean | — |
ordinalsoptional | boolean | — |
autoListsoptional | boolean | — |
autoCapitalizeoptional | boolean | — |
autoLinksoptional | boolean | — |
capitalizeTableCellsoptional | boolean | — |
replacementsoptional | Readonly<Record<string, string>> | — |
exceptionsoptional | readonly string[] | — |
Defined in packages/document/src/editor/editing/types.ts:173
AutocorrectStorageinterface#
interface AutocorrectStorage| Property | Type | Description |
|---|---|---|
load | () => AutocorrectOptions | null | undefined | Promise<AutocorrectOptions | null | undefined> | — |
save | (options: AutocorrectOptions) => void | Promise<void> | — |
Defined in packages/document/src/editor/editing/types.ts:187
AutosaveOptionsinterface#
interface AutosaveOptions| Property | Type | Description |
|---|---|---|
delayoptional | number | — |
save | (data: DocumentData) => void | Promise<void> | — |
Defined in packages/document/src/editor/editing/types.ts:203
BibliographySourceinterface#
interface BibliographySource| Property | Type | Description |
|---|---|---|
tag | string | — |
type | SourceType | — |
authorsoptional | SourcePerson[] | — |
editorsoptional | SourcePerson[] | — |
corporateAuthoroptional | string | — |
titleoptional | string | — |
yearoptional | string | — |
monthoptional | string | — |
dayoptional | string | — |
cityoptional | string | — |
publisheroptional | string | — |
editionoptional | string | — |
bookTitleoptional | string | — |
journalNameoptional | string | — |
periodicalTitleoptional | string | — |
conferenceNameoptional | string | — |
institutionoptional | string | — |
volumeoptional | string | — |
issueoptional | string | — |
pagesoptional | string | — |
urloptional | string | — |
yearAccessedoptional | string | — |
monthAccessedoptional | string | — |
dayAccessedoptional | string | — |
guidoptional | string | — |
docxoptional | { extra: string } | null | — |
Defined in packages/document/src/types.ts:493
BookmarkInfointerface#
interface BookmarkInfoDefined in packages/document/src/editor/objects/types.ts:174
BorderLineinterface#
interface BorderLine| Property | Type | Description |
|---|---|---|
style | string | — |
width | number | — |
color | string | null | — |
spaceoptional | number | — |
shadowoptional | boolean | — |
Defined in packages/document/src/types.ts:349
CaptionValueinterface#
interface CaptionValueDefined in packages/document/src/editor/objects/types.ts:193
CellBordersValueinterface#
interface CellBordersValue| Property | Type | Description |
|---|---|---|
edge | BorderEdge | — |
styleoptional | 'single' | 'dashed' | 'dotted' | 'double' | — |
widthoptional | number | — |
coloroptional | string | — |
Defined in packages/document/src/editor/objects/types.ts:107
CellRevisionInfointerface#
interface CellRevisionInfo extends Omit<RevisionInfo, 'kind'>| Property | Type | Description |
|---|---|---|
kind | 'insertion' | 'deletion' | 'merge' | — |
date | string | Inherited from RevisionInfo. |
id | string | Inherited from RevisionInfo. |
author | string | Inherited from RevisionInfo. |
moveIdoptional | string | null | undefined | Inherited from RevisionInfo. |
Defined in packages/document/src/types.ts:304
ChartModelinterface#
interface ChartModel| Property | Type | Description |
|---|---|---|
type | ChartType | — |
titleoptional | string | — |
categories | string[] | Category names, or the x values of a scatter chart. |
series | ChartSeries[] | — |
stackingoptional | 'stacked' | 'percent' | — |
legendoptional | 'none' | 'right' | 'top' | Where the legend is drawn; the default is below the chart. |
categoryTitleoptional | string | — |
valueTitleoptional | string | — |
Defined in packages/document/src/types.ts:460
ChartProviderinterface#
interface ChartProvider| Property | Type | Description |
|---|---|---|
create | () => ChartResult | null | Promise<ChartResult | null> | — |
editoptional | (data: unknown) => ChartResult | null | Promise<ChartResult | null> | — |
Defined in packages/document/src/types.ts:399
ChartResultinterface#
interface ChartResult| Property | Type | Description |
|---|---|---|
src | string | — |
widthoptional | number | — |
heightoptional | number | — |
altoptional | string | — |
dataoptional | unknown | — |
Defined in packages/document/src/types.ts:385
ChartSeriesinterface#
interface ChartSeriesDefined in packages/document/src/types.ts:454
CitationOptionsinterface#
interface CitationOptions| Property | Type | Description |
|---|---|---|
tags | string | readonly string[] | One tag, or several for a citation that names more than one source. |
pagesoptional | string | — |
suppressAuthoroptional | boolean | — |
suppressYearoptional | boolean | — |
Defined in packages/document/src/editor/citations/types.ts:3
CitationRequestinterface#
interface CitationRequest| Property | Type | Description |
|---|---|---|
tags | string[] | — |
pagesoptional | string | — |
suppressAuthoroptional | boolean | — |
suppressYearoptional | boolean | — |
Defined in packages/document/src/model/citations.ts:22
CitationRuninterface#
interface CitationRunDefined in packages/document/src/model/citations.ts:17
CitationsApiinterface#
interface CitationsApi| Member | Type | Description |
|---|---|---|
getSources() | () => BibliographySource[] | — |
setSources() | (sources: readonly BibliographySource[]) => void | — |
addSource() | (source: Omit<BibliographySource, 'tag'> & { tag?: string }) => string | null | Adds a source, or replaces the one with the same tag, and returns its tag. |
removeSource() | (tag: string) => boolean | — |
getCitationStyle() | () => CitationStyle | — |
setCitationStyle() | (style: CitationStyle) => void | — |
insertCitation() | (citation: string | CitationOptions) => boolean | — |
insertBibliography() | () => boolean | — |
updateCitations() | () => number | Rewrites every citation and bibliography from the sources and returns how many changed. |
Defined in packages/document/src/editor/citations/types.ts:11
CitationsEventsinterface#
interface CitationsEvents| Property | Type | Description |
|---|---|---|
sourcesChange | { sources: BibliographySource[]; style: CitationStyle } | — |
Defined in packages/document/src/editor/citations/types.ts:27
CollabApiinterface#
interface CollabApi| Member | Type | Description |
|---|---|---|
getCollabVersion() | () => number | — |
getCollabStatus() | () => CollabStatus | — |
getCollabConnection() | () => CollabConnectionStatus | — |
saveCollabVersion() | (name: string) => Promise<CollabVersionInfo | null> | — |
listCollabVersions() | () => Promise<CollabVersionInfo[]> | — |
restoreCollabVersion() | (id: string) => Promise<boolean> | — |
diffCollabVersions() | (fromId: string, toId: string | null, options?: CollabVersionDiffOptions) => Promise<DocNodeJSON | null> | — |
lockRange() | (range?: { from: number; to: number }) => Promise<CollabLock | null> | — |
unlockRange() | (id: string) => void | — |
getLocks() | () => CollabLock[] | — |
sendableSteps() | () => CollabStepsPayload | null | — |
receiveSteps() | (payload: CollabRemotePayload) => boolean | — |
resetCollab() | (snapshot: CollabSnapshot) => void | — |
getCollaborators() | () => Collaborator[] | — |
Defined in packages/document/src/editor/collab/types.ts:410
CollabAuthorityinterface#
interface CollabAuthority| Property | Type | Description |
|---|---|---|
join() | (clientId: CollabClientId, emit: (event: CollabBackendEvent) => void) => CollabAuthorityPeer | — |
version() | () => number | — |
metaVersion() | () => number | — |
baseVersion() | () => number | — |
steps() | () => CollabLogEntry[] | — |
snapshot() | () => CollabSnapshot | null | — |
document() | () => DocumentData | null | The authority's own document at its current version, or null when it runs with trustClients. |
locks() | () => CollabLockState | — |
clients() | () => CollabClientId[] | — |
saveVersion() | (input: CollabVersionInput, clientId: CollabClientId) => CollabVersionInfo | — |
listVersions() | () => CollabVersionInfo[] | — |
loadVersion() | (id: string) => CollabVersionRecord | null | — |
storedVersions() | () => CollabStoredVersion[] | The named versions as they are kept: a full document now and then, and the steps since the previous one otherwise. |
destroy() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:279
CollabAuthorityOptionsinterface#
interface CollabAuthorityOptions| Property | Type | Description |
|---|---|---|
documentoptional | DocumentInput | null | The document at version 0. Without it, and without snapshot, the authority starts from an empty document. |
limitsoptional | Partial<CollabDocumentLimits> | — |
trustClientsoptional | boolean | Relay steps without applying them. Only for a process where every client is your own code, such as a unit test of a transport: a client can then store any document and move any lock. |
snapshotoptional | CollabSnapshot | null | — |
snapshotEveryoptional | number | — |
retainStepsoptional | number | — |
versionsoptional | readonly CollabStoredVersion[] | null | Named versions saved earlier, as storedVersions() returned them. |
nowoptional | () => number | — |
createIdoptional | () => string | — |
Defined in packages/document/src/editor/collab/types.ts:245
CollabAuthorityPeerinterface#
interface CollabAuthorityPeer| Property | Type | Description |
|---|---|---|
clientIdreadonly | CollabClientId | — |
submit() | (payload: CollabStepsPayload) => CollabSubmitResult | — |
pull() | (sinceVersion: number, sinceMeta: number) => void | — |
setPresence() | (state: PresenceState | null) => void | — |
sendSnapshot() | (snapshot: CollabSnapshot) => boolean | — |
acquireLock() | (request: CollabLockRequest) => CollabLock | null | — |
releaseLock() | (id: string) => void | — |
leave() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:268
CollabBackendinterface#
interface CollabBackend| Property | Type | Description |
|---|---|---|
clientIdreadonly | CollabClientId | — |
open() | (emit: (event: CollabBackendEvent) => void) => void | — |
version() | () => number | — |
metaVersion() | () => number | — |
submit() | (payload: CollabStepsPayload) => Promise<CollabSubmitResult> | — |
pull() | (sinceVersion: number, sinceMeta: number) => void | — |
setPresence()optional | (state: PresenceState | null) => void | — |
sendSnapshot()optional | (snapshot: CollabSnapshot) => void | — |
locksoptional | Pick<CollabLockChannel, 'acquire' | 'release'> | — |
versionsoptional | CollabVersionChannel | — |
close() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:197
CollabBackendProviderinterface#
interface CollabBackendProvider extends CollabProvider| Property | Type | Description |
|---|---|---|
clientId | CollabClientId | — |
connection() | () => CollabConnectionStatus | — |
close() | () => void | — |
version | number | (() => number) | Inherited from CollabProvider. |
metaVersionoptional | number | (() => number) | undefined | Inherited from CollabProvider. |
sendSteps() | (payload: CollabStepsPayload) => CollabSendResult | Promise<CollabSendResult> | Inherited from CollabProvider. |
onRemoteSteps() | (handler: (payload: CollabRemotePayload) => void) => () => void | Inherited from CollabProvider. |
requestSteps()optional | ((sinceVersion: number, sinceMeta?: number) => void) | undefined | Inherited from CollabProvider. |
onStatus()optional | ((handler: (status: "online" | "offline") => void) => () => void) | undefined | Inherited from CollabProvider. |
onConnection()optional | ((handler: (status: CollabConnectionStatus) => void) => () => void) | undefined | Inherited from CollabProvider. |
onReset()optional | ((handler: (snapshot: CollabSnapshot) => void) => () => void) | undefined | Inherited from CollabProvider. |
presenceoptional | CollabPresenceChannel | undefined | Inherited from CollabProvider. |
presenceTimeoutoptional | number | undefined | Inherited from CollabProvider. |
commentsoptional | CollabCommentChannel | undefined | Inherited from CollabProvider. |
versionsoptional | CollabVersionChannel | undefined | Inherited from CollabProvider. |
locksoptional | CollabLockChannel | undefined | Inherited from CollabProvider. |
snapshotsoptional | CollabSnapshotChannel | undefined | Inherited from CollabProvider. |
Defined in packages/document/src/editor/collab/types.ts:215
CollabBackendProviderOptionsinterface#
interface CollabBackendProviderOptions| Property | Type | Description |
|---|---|---|
presenceTimeoutoptional | number | — |
Defined in packages/document/src/editor/collab/types.ts:211
CollabBackendStartinterface#
interface CollabBackendStart| Property | Type | Description |
|---|---|---|
clientIdoptional | CollabClientId | — |
versionoptional | number | — |
metaVersionoptional | number | — |
Defined in packages/document/src/editor/collab/types.ts:311
CollabBroadcastBackendOptionsinterface#
interface CollabBroadcastBackendOptions extends CollabWireBackendOptions| Property | Type | Description |
|---|---|---|
channel | CollabBroadcastPort | string | — |
hostTimeoutoptional | number | — |
roomoptional | string | undefined | Inherited from CollabWireBackendOptions. |
requestTimeoutoptional | number | undefined | Inherited from CollabWireBackendOptions. |
clientIdoptional | CollabClientId | undefined | Inherited from CollabBackendStart. |
versionoptional | number | undefined | Inherited from CollabBackendStart. |
metaVersionoptional | number | undefined | Inherited from CollabBackendStart. |
Defined in packages/document/src/editor/collab/types.ts:347
CollabBroadcastPortinterface#
interface CollabBroadcastPort| Property | Type | Description |
|---|---|---|
postMessage() | (message: unknown) => void | — |
addEventListener() | (type: 'message', listener: (event: { data: unknown }) => void) => void | — |
removeEventListener() | (type: 'message', listener: (event: { data: unknown }) => void) => void | — |
close()optional | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:340
CollabCommentChannelinterface#
interface CollabCommentChannel| Property | Type | Description |
|---|---|---|
send() | (operation: CollabCommentOperation) => void | — |
subscribe() | (handler: (operation: CollabCommentOperation) => void) => () => void | — |
Defined in packages/document/src/editor/collab/types.ts:164
CollabDocumentinterface#
interface CollabDocument| Property | Type | Description |
|---|---|---|
apply() | (steps: readonly unknown[]) => CollabDocumentResult | — |
prepare() | (steps: readonly unknown[]) => CollabDocumentPrepared | Checks the steps against the current document without changing it; commit() then makes them current. |
checkMetaOperations() | (operations: readonly CollabMetaOperation[]) => CollabDocumentResult | — |
applyMeta() | (operations: readonly CollabMetaOperation[]) => CollabDocumentResult | — |
size() | () => number | — |
snapshot() | () => DocumentData | — |
Defined in packages/document/src/editor/collab/types.ts:235
CollabDocumentLimitsinterface#
interface CollabDocumentLimits| Property | Type | Description |
|---|---|---|
maxStepsPerSubmit | number | — |
maxSubmitBytes | number | — |
maxDocumentSize | number | — |
maxMetaPerSubmit | number | — |
maxCommentLength | number | — |
Defined in packages/document/src/editor/collab/types.ts:221
CollabEventsinterface#
interface CollabEvents| Property | Type | Description |
|---|---|---|
collabStatus | CollabStatus | — |
collabConnection | { status: CollabConnectionStatus; previous: CollabConnectionStatus } | — |
collabRejected | { reason: CollabRejectReason; steps: number } | — |
collabRestored | { steps: number; version: number } | — |
presenceChange | { collaborators: Collaborator[] } | — |
locksChange | { locks: CollabLock[] } | — |
Defined in packages/document/src/editor/collab/types.ts:397
CollabLockinterface#
interface CollabLockDefined in packages/document/src/editor/collab/types.ts:81
CollabLockChannelinterface#
interface CollabLockChannel| Property | Type | Description |
|---|---|---|
acquire() | (request: CollabLockRequest) => Promise<CollabLock | null> | — |
release() | (id: string) => void | — |
subscribe() | (handler: (state: CollabLockState) => void) => () => void | — |
Defined in packages/document/src/editor/collab/types.ts:102
CollabLockRequestinterface#
interface CollabLockRequestDefined in packages/document/src/editor/collab/types.ts:95
CollabLockStateinterface#
interface CollabLockState| Property | Type | Description |
|---|---|---|
version | number | — |
locks | CollabLock[] | — |
revisionoptional | number | — |
Defined in packages/document/src/editor/collab/types.ts:89
CollabLogEntryinterface#
interface CollabLogEntry| Property | Type | Description |
|---|---|---|
step | unknown | — |
clientId | CollabClientId | — |
Defined in packages/document/src/editor/collab/types.ts:263
CollabOfflineRecordinterface#
interface CollabOfflineRecord| Property | Type | Description |
|---|---|---|
version | number | The version the unsent steps start from. |
document | DocNodeJSON | The document body at version, without the unsent steps. |
steps | unknown[] | — |
clientId | CollabClientId | — |
savedAt | number | — |
Defined in packages/document/src/editor/collab/types.ts:372
CollabOfflineStoreinterface#
interface CollabOfflineStore| Property | Type | Description |
|---|---|---|
load() | () => CollabOfflineRecord | null | Promise<CollabOfflineRecord | null> | — |
save() | (record: CollabOfflineRecord) => void | Promise<void> | — |
clear() | () => void | Promise<void> | — |
Defined in packages/document/src/editor/collab/types.ts:382
CollabOptionsinterface#
interface CollabOptions| Property | Type | Description |
|---|---|---|
collaboptional | CollabProvider | null | — |
collabStorageoptional | CollabOfflineStore | null | Where edits that have not reached the authority are kept. Without it they live in memory and are lost when the
tab closes. createIndexedDbOfflineStore({ key }) keeps them across a reload. |
Defined in packages/document/src/editor/collab/types.ts:388
Collaboratorinterface#
interface Collaborator| Property | Type | Description |
|---|---|---|
clientId | CollabClientId | — |
name | string | — |
color | string | — |
anchor | number | null | — |
head | number | null | — |
focused | boolean | — |
Defined in packages/document/src/editor/collab/types.ts:363
CollabPresenceChannelinterface#
interface CollabPresenceChannel| Property | Type | Description |
|---|---|---|
send() | (state: PresenceState) => void | — |
subscribe() | (handler: (states: Record<string, PresenceState>) => void) => () => void | — |
Defined in packages/document/src/editor/collab/types.ts:159
CollabProviderinterface#
interface CollabProvider| Property | Type | Description |
|---|---|---|
version | number | (() => number) | — |
clientIdoptional | CollabClientId | — |
metaVersionoptional | number | (() => number) | — |
sendSteps() | (payload: CollabStepsPayload) => CollabSendResult | Promise<CollabSendResult> | — |
onRemoteSteps() | (handler: (payload: CollabRemotePayload) => void) => () => void | — |
requestSteps()optional | (sinceVersion: number, sinceMeta?: number) => void | — |
onStatus()optional | (handler: (status: 'online' | 'offline') => void) => () => void | — |
onConnection()optional | (handler: (status: CollabConnectionStatus) => void) => () => void | — |
onReset()optional | (handler: (snapshot: CollabSnapshot) => void) => () => void | — |
presenceoptional | CollabPresenceChannel | — |
presenceTimeoutoptional | number | — |
commentsoptional | CollabCommentChannel | — |
versionsoptional | CollabVersionChannel | — |
locksoptional | CollabLockChannel | — |
snapshotsoptional | CollabSnapshotChannel | — |
Defined in packages/document/src/editor/collab/types.ts:169
CollabRemotePayloadinterface#
interface CollabRemotePayload| Property | Type | Description |
|---|---|---|
steps | unknown[] | — |
clientIds | CollabClientId[] | — |
versionoptional | number | — |
metaoptional | CollabMetaOperation[] | — |
metaClientIdoptional | CollabClientId | — |
metaVersionoptional | number | — |
metaClientIdsoptional | CollabClientId[] | — |
Defined in packages/document/src/editor/collab/types.ts:46
CollabSnapshotinterface#
interface CollabSnapshot| Property | Type | Description |
|---|---|---|
document | DocumentInput | — |
version | number | — |
metaVersionoptional | number | — |
Defined in packages/document/src/editor/collab/types.ts:65
CollabSnapshotChannelinterface#
interface CollabSnapshotChannel| Property | Type | Description |
|---|---|---|
send() | (snapshot: CollabSnapshot) => void | — |
subscribe() | (handler: () => void) => () => void | — |
Defined in packages/document/src/editor/collab/types.ts:154
CollabSocketBackendOptionsinterface#
interface CollabSocketBackendOptions extends CollabWireBackendOptions| Property | Type | Description |
|---|---|---|
connect | () => CollabSocketLike | — |
reconnectMinoptional | number | — |
reconnectMaxoptional | number | — |
maxAttemptsoptional | number | — |
heartbeatoptional | number | — |
roomoptional | string | undefined | Inherited from CollabWireBackendOptions. |
requestTimeoutoptional | number | undefined | Inherited from CollabWireBackendOptions. |
clientIdoptional | CollabClientId | undefined | Inherited from CollabBackendStart. |
versionoptional | number | undefined | Inherited from CollabBackendStart. |
metaVersionoptional | number | undefined | Inherited from CollabBackendStart. |
Defined in packages/document/src/editor/collab/types.ts:332
CollabSocketLikeinterface#
interface CollabSocketLike| Property | Type | Description |
|---|---|---|
readyState | number | — |
send() | (data: string) => void | — |
close() | (code?: number, reason?: string) => void | — |
addEventListener() | (type: 'open' | 'message' | 'close' | 'error', listener: (event: { data?: unknown; type?: string }) => void) => void | — |
Defined in packages/document/src/editor/collab/types.ts:322
CollabStatusinterface#
interface CollabStatus| Property | Type | Description |
|---|---|---|
state | CollabState | — |
version | number | — |
unconfirmed | number | — |
clientId | CollabClientId | null | — |
online | boolean | — |
connection | CollabConnectionStatus | — |
Defined in packages/document/src/editor/collab/types.ts:354
CollabStepFootprintinterface#
interface CollabStepFootprintDefined in packages/document/src/editor/collab/types.ts:32
CollabStepsPayloadinterface#
interface CollabStepsPayload| Property | Type | Description |
|---|---|---|
version | number | — |
steps | unknown[] | — |
clientId | CollabClientId | — |
metaoptional | CollabMetaOperation[] | — |
footprintoptional | CollabStepFootprint[] | — |
Defined in packages/document/src/editor/collab/types.ts:38
CollabSubmitResultinterface#
interface CollabSubmitResult| Property | Type | Description |
|---|---|---|
accepted | boolean | — |
versionoptional | number | — |
reasonoptional | CollabRejectReason | — |
detailoptional | string | — |
Defined in packages/document/src/editor/collab/types.ts:58
CollabVersionChannelinterface#
interface CollabVersionChannel| Property | Type | Description |
|---|---|---|
save() | (input: CollabVersionInput) => Promise<CollabVersionInfo> | — |
list() | () => Promise<CollabVersionInfo[]> | — |
load() | (id: string) => Promise<CollabVersionRecord | null> | — |
Defined in packages/document/src/editor/collab/types.ts:148
CollabVersionDeltainterface#
interface CollabVersionDelta extends CollabVersionInfoA version kept as the steps and document updates made since the version named by parent.
| Property | Type | Description |
|---|---|---|
metaVersion | number | — |
parent | string | — |
steps | unknown[] | — |
meta | CollabVersionMetaEntry[] | — |
id | string | Inherited from CollabVersionInfo. |
name | string | Inherited from CollabVersionInfo. |
createdAt | string | Inherited from CollabVersionInfo. |
author | string | Inherited from CollabVersionInfo. |
clientId | CollabClientId | Inherited from CollabVersionInfo. |
version | number | Inherited from CollabVersionInfo. |
Defined in packages/document/src/editor/collab/types.ts:132
CollabVersionDiffOptionsinterface#
interface CollabVersionDiffOptions extends CompareOptions| Property | Type | Description |
|---|---|---|
idPrefixoptional | string | — |
authoroptional | string | undefined | Inherited from CompareOptions. |
dateoptional | string | undefined | Inherited from CompareOptions. |
granularityoptional | "word" | "character" | undefined | Inherited from CompareOptions. |
movesoptional | boolean | undefined | Inherited from CompareOptions. |
formattingoptional | boolean | undefined | Inherited from CompareOptions. |
Defined in packages/document/src/editor/collab/types.ts:406
CollabVersionInfointerface#
interface CollabVersionInfo| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
createdAt | string | — |
author | string | — |
clientId | CollabClientId | — |
version | number | — |
Defined in packages/document/src/editor/collab/types.ts:108
CollabVersionInputinterface#
interface CollabVersionInput| Property | Type | Description |
|---|---|---|
name | string | — |
author | string | — |
version | number | — |
document | DocumentInput | — |
Defined in packages/document/src/editor/collab/types.ts:141
CollabVersionMetaEntryinterface#
interface CollabVersionMetaEntry| Property | Type | Description |
|---|---|---|
at | number | The step version the operation was applied at. |
operation | CollabMetaOperation | — |
Defined in packages/document/src/editor/collab/types.ts:125
CollabVersionRecordinterface#
interface CollabVersionRecord extends CollabVersionInfo| Property | Type | Description |
|---|---|---|
document | DocumentInput | — |
id | string | Inherited from CollabVersionInfo. |
name | string | Inherited from CollabVersionInfo. |
createdAt | string | Inherited from CollabVersionInfo. |
author | string | Inherited from CollabVersionInfo. |
clientId | CollabClientId | Inherited from CollabVersionInfo. |
version | number | Inherited from CollabVersionInfo. |
Defined in packages/document/src/editor/collab/types.ts:117
CollabVersionSnapshotinterface#
interface CollabVersionSnapshot extends CollabVersionRecord| Property | Type | Description |
|---|---|---|
metaVersionoptional | number | — |
document | DocumentInput | Inherited from CollabVersionRecord. |
id | string | Inherited from CollabVersionInfo. |
name | string | Inherited from CollabVersionInfo. |
createdAt | string | Inherited from CollabVersionInfo. |
author | string | Inherited from CollabVersionInfo. |
clientId | CollabClientId | Inherited from CollabVersionInfo. |
version | number | Inherited from CollabVersionInfo. |
Defined in packages/document/src/editor/collab/types.ts:121
CollabWireBackendOptionsinterface#
interface CollabWireBackendOptions extends CollabBackendStart| Property | Type | Description |
|---|---|---|
roomoptional | string | — |
requestTimeoutoptional | number | — |
clientIdoptional | CollabClientId | undefined | Inherited from CollabBackendStart. |
versionoptional | number | undefined | Inherited from CollabBackendStart. |
metaVersionoptional | number | undefined | Inherited from CollabBackendStart. |
Defined in packages/document/src/editor/collab/types.ts:317
CollabWireEndpointinterface#
interface CollabWireEndpoint| Property | Type | Description |
|---|---|---|
receive() | (message: CollabWireMessage) => void | — |
close() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:306
CollabWireLinkinterface#
interface CollabWireLink| Property | Type | Description |
|---|---|---|
send() | (message: CollabWireMessage) => boolean | — |
open() | (handlers: { message(message: CollabWireMessage): void; status(status: CollabConnectionStatus): void }) => void | — |
close() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:300
ColumnSettingsinterface#
interface ColumnSettings| Property | Type | Description |
|---|---|---|
count | number | — |
gapoptional | number | — |
separatoroptional | boolean | — |
widthsoptional | { width: number; gap: number }[] | — |
Defined in packages/document/src/editor/editing/types.ts:252
CombineOptionsinterface#
interface CombineOptions extends Pick<CompareOptions, 'date' | 'granularity' | 'formatting'>| Property | Type | Description |
|---|---|---|
firstAuthoroptional | string | — |
secondAuthoroptional | string | — |
movesoptional | boolean | — |
dateoptional | string | undefined | Inherited from CompareOptions. |
granularityoptional | "word" | "character" | undefined | Inherited from CompareOptions. |
formattingoptional | boolean | undefined | Inherited from CompareOptions. |
Defined in packages/document/src/model/combine.ts:5
CommentMentioninterface#
interface CommentMentionDefined in packages/document/src/types.ts:119
CommentReplyinterface#
interface CommentReply| Property | Type | Description |
|---|---|---|
id | string | — |
author | string | — |
date | string | — |
text | string | — |
mentionsoptional | CommentMention[] | — |
durableIdoptional | string | Word's lasting identifier of the comment (commentsIds), kept so commentsExtensible can be written back. |
dateUtcoptional | string | The time of the comment in UTC, from Word's commentsExtensible part. |
Defined in packages/document/src/types.ts:126
CommentThreadinterface#
interface CommentThread| Property | Type | Description |
|---|---|---|
id | string | — |
author | string | — |
date | string | — |
text | string | — |
resolved | boolean | — |
replies | CommentReply[] | — |
mentionsoptional | CommentMention[] | — |
durableIdoptional | string | Word's lasting identifier of the comment (commentsIds), kept so commentsExtensible can be written back. |
dateUtcoptional | string | The time of the comment in UTC, from Word's commentsExtensible part. |
Defined in packages/document/src/types.ts:138
CompareOptionsinterface#
interface CompareOptions| Property | Type | Description |
|---|---|---|
authoroptional | string | — |
dateoptional | string | — |
granularityoptional | 'word' | 'character' | — |
movesoptional | boolean | — |
formattingoptional | boolean | — |
Defined in packages/document/src/types.ts:889
CompatibilitySettingsinterface#
interface CompatibilitySettingsDefined in packages/document/src/types.ts:189
ContentControlinterface#
interface ContentControl| Property | Type | Description |
|---|---|---|
kind | ContentControlKind | — |
idoptional | string | — |
tagoptional | string | — |
titleoptional | string | — |
lockoptional | 'sdtLocked' | 'contentLocked' | 'sdtContentLocked' | 'unlocked' | — |
isPlaceholderoptional | boolean | — |
bindingoptional | { xpath: string; storeItemId?: string; prefixMappings?: string } | null | — |
itemsoptional | { text: string; value: string }[] | — |
checkedoptional | boolean | — |
dateoptional | { value?: string; format?: string } | — |
multiLineoptional | boolean | — |
Defined in packages/document/src/types.ts:282
ContentControlValueinterface#
interface ContentControlValue| Property | Type | Description |
|---|---|---|
kind | FormControlKind | — |
titleoptional | string | — |
tagoptional | string | — |
placeholderoptional | string | — |
itemsoptional | { text: string; value: string }[] | — |
dateFormatoptional | string | — |
lockContentoptional | boolean | — |
lockControloptional | boolean | — |
requiredoptional | boolean | — |
checkedoptional | boolean | — |
Defined in packages/document/src/editor/objects/types.ts:209
CrossReferenceValueinterface#
interface CrossReferenceValue| Property | Type | Description |
|---|---|---|
target | CrossReferenceTarget | — |
indexoptional | number | — |
nameoptional | string | — |
displayoptional | CrossReferenceDisplay | — |
hyperlinkoptional | boolean | — |
Defined in packages/document/src/editor/objects/types.ts:185
DetailedWordCountinterface#
interface DetailedWordCount| Property | Type | Description |
|---|---|---|
pages | number | — |
words | number | — |
characters | number | — |
charactersNoSpaces | number | — |
paragraphs | number | — |
lines | number | — |
isSelection | boolean | — |
Defined in packages/document/src/editor/editing/types.ts:208
DocLimitsinterface#
interface DocLimits| Property | Type | Description |
|---|---|---|
maxBytes | number | Largest file that is read at all, in bytes. |
maxCharacters | number | Largest number of characters in the body of the document. |
maxPictureBytes | number | Total size of the pictures that are kept, in bytes. Pictures past it are left out. |
maxTableCells | number | Largest number of cells in one table. A table past it is read as paragraphs. |
Defined in packages/document/src/doc/errors.ts:15
DocMarkJSONinterface#
interface DocMarkJSONDefined in packages/document/src/types.ts:29
DocNodeJSONinterface#
interface DocNodeJSON| Property | Type | Description |
|---|---|---|
type | string | — |
attrsoptional | Record<string, unknown> | — |
contentoptional | DocNodeJSON[] | — |
marksoptional | DocMarkJSON[] | — |
textoptional | string | — |
Defined in packages/document/src/types.ts:34
DocReadOptionsinterface#
interface DocReadOptionsDefined in packages/document/src/doc/reader.ts:43
DocumentDatainterface#
interface DocumentData extends HeaderFooterContent| Property | Type | Description |
|---|---|---|
version | 1 | — |
content | DocNodeJSON | — |
page | PageSetup | — |
comments | CommentThread[] | — |
properties | DocumentProperties | — |
defaults | DocumentDefaults | — |
evenHeaderoptional | DocNodeJSON | null | — |
evenFooteroptional | DocNodeJSON | null | — |
settingsoptional | DocumentSettings | — |
stylesoptional | DocumentStyle[] | — |
numberingoptional | NumberingDefinitions | — |
protectionoptional | DocumentProtection | null | — |
peopleoptional | DocumentPerson[] | — |
docxoptional | DocxPackage | null | — |
watermarkoptional | Watermark | null | — |
lineNumbersoptional | LineNumbering | null | — |
listsoptional | MultilevelListDefinition[] | — |
sourcesoptional | BibliographySource[] | — |
citationStyleoptional | CitationStyle | — |
header | DocNodeJSON | null | Inherited from HeaderFooterContent. |
footer | DocNodeJSON | null | Inherited from HeaderFooterContent. |
firstHeader | DocNodeJSON | null | Inherited from HeaderFooterContent. |
firstFooter | DocNodeJSON | null | Inherited from HeaderFooterContent. |
Defined in packages/document/src/types.ts:522
DocumentDefaultsinterface#
interface DocumentDefaults| Property | Type | Description |
|---|---|---|
fontFamily | string | — |
fontSize | number | — |
Defined in packages/document/src/types.ts:429
DocumentEditorApiinterface#
interface DocumentEditorApi extends Widget<DocumentEditorOptions, DocumentEditorEvents>, EditingApi, ObjectsApi, ReviewApi, CollabApi, RibbonApi, LayoutApi, FileApi, CitationsApi, AccessibilityApi, DrawApi, ReadAloudApi, SpellingApi| Member | Type | Description |
|---|---|---|
getJSON() | () => DocumentData | — |
setJSON() | (data: DocumentInput) => void | — |
getText() | () => string | — |
importDocx() | (input: ArrayBuffer | Uint8Array | Blob, options?: { limits?: Partial<ZipLimits> }) => Promise<void> | — |
exportDocx() | () => Promise<Blob> | — |
downloadDocx() | (fileName?: string) => Promise<void> | — |
exportHtml() | (options?: HtmlExportOptions) => string | — |
importHtml() | (html: string) => void | — |
print() | () => void | — |
exec() | (command: DocumentCommand, value?: unknown) => boolean | — |
canExec() | (command: DocumentCommand, value?: unknown) => boolean | — |
getFormatState() | () => FormatState | — |
getSelection() | () => { from: number; to: number; text: string } | — |
setSelection() | (from: number, to?: number) => void | — |
undo() | () => boolean | — |
redo() | () => boolean | — |
canUndo() | () => boolean | — |
canRedo() | () => boolean | — |
find() | (query: string, options?: FindOptions) => FindResult | — |
findNext() | () => FindResult | — |
findPrevious() | () => FindResult | — |
replace() | (replacement: string) => FindResult | — |
replaceAll() | (query: string, replacement: string, options?: FindOptions) => number | — |
clearFind() | () => void | — |
openFindPanel() | (mode?: 'find' | 'replace') => void | — |
setTrackChanges() | (enabled: boolean) => void | — |
isTrackingChanges() | () => boolean | — |
setShowMarkup() | (visible: boolean) => void | — |
getTrackedChanges() | () => TrackedChange[] | — |
acceptChange() | (id: string) => boolean | — |
rejectChange() | (id: string) => boolean | — |
acceptAllChanges() | () => number | — |
rejectAllChanges() | () => number | — |
addComment() | (text: string, options?: AddCommentOptions) => string | null | — |
getComments() | () => CommentThread[] | — |
replyToComment() | (id: string, text: string, options?: AddCommentOptions) => string | null | — |
editComment() | (id: string, text: string) => boolean | — |
resolveComment() | (id: string, resolved?: boolean) => boolean | — |
deleteComment() | (id: string) => boolean | — |
selectComment() | (id: string) => boolean | — |
compareWith() | (revised: DocumentInput, options?: CompareOptions) => number | — |
proposeChange() | (change: ProposedChange) => string[] | — |
applySteps() | (steps: readonly unknown[]) => boolean | — |
insertField() | (name: string) => boolean | — |
getFieldNames() | () => string[] | — |
merge() | (values: MergeValues, options?: MergeOptions) => DocumentData | — |
applyMerge() | (values: MergeValues, options?: MergeOptions) => void | — |
insertImage() | (src: string, options?: InsertImageOptions) => boolean | — |
insertTable() | (rows: number, columns: number) => boolean | — |
getWordCount() | () => WordCount | — |
getPageCount() | () => number | — |
getCurrentPage() | () => number | — |
getPageSetup() | () => PageSetup | — |
setPageSetup() | (setup: Partial<PageSetup>) => void | — |
setLayout() | (layout: DocumentLayout) => void | — |
getLayout() | () => DocumentLayout | — |
setZoom() | (zoom: number) => void | — |
getZoom() | () => number | — |
getOutline() | () => OutlineEntry[] | — |
scrollToHeading() | (index: number) => boolean | — |
setReadOnly() | (readOnly: boolean) => void | — |
isReadOnly() | () => boolean | — |
setAuthor() | (author: AuthorInfo | string) => void | — |
editHeaderFooter() | (part: 'header' | 'footer') => void | — |
relayout() | () => void | — |
focus() | () => void | — |
elementreadonly | HTMLElement | Inherited from Widget. |
update() | (options: Partial<DocumentEditorOptions>) => void | Inherited from Widget. |
on() | <K extends keyof TEvents & string>(event: K, listener: Listener<TEvents[K]>) => () => void | Inherited from Widget. |
destroy() | () => void | Inherited from Widget. |
openPane() | (id: string) => boolean | Inherited from EditingApi. |
closePane() | (id: string) => boolean | Inherited from EditingApi. |
isPaneOpen() | (id: string) => boolean | Inherited from EditingApi. |
getStyles() | () => ParagraphStyleInfo[] | Inherited from EditingApi. |
applyStyle() | (id: string) => boolean | Inherited from EditingApi. |
createStyle() | (name: string, format?: StyleFormat, basedOn?: string) => string | null | Inherited from EditingApi. |
createStyleFromSelection() | (name: string) => string | null | Inherited from EditingApi. |
modifyStyle() | (id: string, format: StyleFormat, name?: string) => boolean | Inherited from EditingApi. |
updateStyleToMatchSelection() | (id: string) => boolean | Inherited from EditingApi. |
deleteStyle() | (id: string) => boolean | Inherited from EditingApi. |
getFontFormat() | () => Required<FontFormat> | Inherited from EditingApi. |
setFontFormat() | (format: FontFormat) => boolean | Inherited from EditingApi. |
getDocumentProperties() | () => DocumentProperties | Inherited from EditingApi. |
setDocumentProperties() | (properties: { [K in keyof DocumentProperties]?: DocumentProperties[K] | null; }) => boolean | Inherited from EditingApi. |
getAutocorrectOptions() | () => Required<AutocorrectOptions> | null | Inherited from EditingApi. |
setAutocorrectOptions() | (options: AutocorrectOptions) => boolean | Inherited from EditingApi. |
setHyperlink() | (options: HyperlinkOptions | null) => boolean | Inherited from EditingApi. |
setParagraphFormat() | (format: ParagraphFormat) => boolean | Inherited from EditingApi. |
setParagraphBorders() | (borders: ParagraphBorders | null, shading?: string | null) => boolean | Inherited from EditingApi. |
changeCase() | (mode: CaseMode) => boolean | Inherited from EditingApi. |
setDropCap() | (mode: "none" | "drop" | "margin", lines?: number) => boolean | Inherited from EditingApi. |
collapseHeading() | (index: number, collapsed: boolean) => boolean | Inherited from EditingApi. |
isHeadingCollapsed() | (index: number) => boolean | Inherited from EditingApi. |
moveSection() | (index: number, targetIndex: number) => boolean | Inherited from EditingApi. |
getDetailedWordCount() | () => DetailedWordCount | Inherited from EditingApi. |
getFindResults() | (query: string, options?: FindOptions) => FindPaneResult[] | Inherited from EditingApi. |
getListDefinitions() | () => MultilevelListDefinition[] | Inherited from EditingApi. |
getListLevels() | () => ListLevelFormat[] | null | The levels of the Word list that holds the cursor, or null when the cursor is not in a list from a Word file. Inherited from EditingApi. |
setListLevels() | (levels: readonly ListLevelFormat[]) => boolean | Changes the levels of the Word list that holds the cursor; every list that uses the same definition follows. Inherited from EditingApi. |
defineMultilevelList() | (definition: Omit<MultilevelListDefinition, "id"> & { id?: string; }) => string | Inherited from EditingApi. |
pasteHtml() | (html: string, mode?: PasteMode) => boolean | Inherited from EditingApi. |
saveNow() | () => Promise<void> | Inherited from EditingApi. |
isSaving() | () => boolean | Inherited from EditingApi. |
getWatermark() | () => Watermark | null | Inherited from EditingApi. |
setWatermark() | (watermark: Watermark | string | null) => boolean | Inherited from EditingApi. |
getLineNumbers() | () => LineNumbering | null | Inherited from EditingApi. |
setLineNumbers() | (numbering: LineNumbering | boolean | null) => boolean | Inherited from EditingApi. |
getColumns() | () => ColumnSettings | Inherited from EditingApi. |
setColumns() | (columns: ColumnSettings | number) => boolean | Inherited from EditingApi. |
insertBreak() | (kind: BreakKind) => boolean | Inherited from EditingApi. |
getFootnotes() | (kind?: NoteKind) => FootnoteInfo[] | Inherited from ObjectsApi. |
getBookmarks() | (includeHidden?: boolean) => BookmarkInfo[] | Inherited from ObjectsApi. |
goToBookmark() | (name: string) => boolean | Inherited from ObjectsApi. |
updateFields() | () => number | Inherited from ObjectsApi. |
setFormMode() | (enabled: boolean) => void | Inherited from ObjectsApi. |
isFormMode() | () => boolean | Inherited from ObjectsApi. |
getFormData() | () => Record<string, unknown> | Inherited from ObjectsApi. |
setFormData() | (data: Record<string, unknown>) => number | Inherited from ObjectsApi. |
validateForm() | () => FormFieldError[] | Inherited from ObjectsApi. |
openObjectDialog() | (name: ObjectDialogName) => boolean | Inherited from ObjectsApi. |
evaluateTableFormula() | (formula: string) => string | null | Inherited from ObjectsApi. |
getProtection() | () => DocumentProtection | null | Inherited from ObjectsApi. |
protectDocument() | (mode: ProtectionMode, password?: string) => Promise<boolean> | Inherited from ObjectsApi. |
unprotectDocument() | (password?: string) => Promise<boolean> | Inherited from ObjectsApi. |
isPasswordProtected() | () => boolean | Inherited from ObjectsApi. |
insertEmbeddedObject() | (options: InsertEmbeddedObjectOptions) => boolean | Inherited from ObjectsApi. |
getEmbeddedObjects() | () => EmbeddedObjectInfo[] | Inherited from ObjectsApi. |
openEmbeddedObject() | (pos?: number) => boolean | Inherited from ObjectsApi. |
downloadEmbeddedObject() | (pos?: number) => boolean | Inherited from ObjectsApi. |
getMarkupMode() | () => MarkupMode | Inherited from ReviewApi. |
setMarkupMode() | (mode: MarkupMode) => void | Inherited from ReviewApi. |
getMarkupVisibility() | () => MarkupVisibility | Inherited from ReviewApi. |
setMarkupVisibility() | (visibility: Partial<MarkupVisibility>) => void | Inherited from ReviewApi. |
getRevisions() | (filter?: RevisionFilter) => RevisionChange[] | Inherited from ReviewApi. |
acceptChanges() | (filter?: RevisionFilter) => number | Inherited from ReviewApi. |
rejectChanges() | (filter?: RevisionFilter) => number | Inherited from ReviewApi. |
nextChange() | () => RevisionChange | null | Inherited from ReviewApi. |
previousChange() | () => RevisionChange | null | Inherited from ReviewApi. |
goToChange() | (id: string) => boolean | Inherited from ReviewApi. |
editReply() | (threadId: string, replyId: string, text: string) => boolean | Inherited from ReviewApi. |
deleteReply() | (threadId: string, replyId: string) => boolean | Inherited from ReviewApi. |
saveSnapshot() | (label?: string) => SnapshotInfo | null | Inherited from ReviewApi. |
getSnapshots() | () => SnapshotInfo[] | Inherited from ReviewApi. |
restoreSnapshot() | (id: string) => boolean | Inherited from ReviewApi. |
compareWithSnapshot() | (id: string, options?: CompareOptions) => number | Inherited from ReviewApi. |
deleteSnapshot() | (id: string) => boolean | Inherited from ReviewApi. |
getSnapshotDocument() | (id: string) => DocumentData | null | Inherited from ReviewApi. |
compareWithDocx() | (input: ArrayBuffer | Uint8Array | Blob, options?: CompareOptions) => Promise<number> | Inherited from ReviewApi. |
compareSideBySide() | (revised: DocumentInput, options?: SideBySideOptions) => boolean | Inherited from ReviewApi. |
closeSideBySide() | () => boolean | Inherited from ReviewApi. |
isSideBySideOpen() | () => boolean | Inherited from ReviewApi. |
combineWith() | (first: DocumentInput, second: DocumentInput, options?: CombineOptions) => number | Inherited from ReviewApi. |
combineWithDocx() | (first: ArrayBuffer | Uint8Array | Blob, second: ArrayBuffer | Uint8Array | Blob, options?: CombineOptions) => Promise<number> | Inherited from ReviewApi. |
getCollabVersion() | () => number | Inherited from CollabApi. |
getCollabStatus() | () => CollabStatus | Inherited from CollabApi. |
getCollabConnection() | () => CollabConnectionStatus | Inherited from CollabApi. |
saveCollabVersion() | (name: string) => Promise<CollabVersionInfo | null> | Inherited from CollabApi. |
listCollabVersions() | () => Promise<CollabVersionInfo[]> | Inherited from CollabApi. |
restoreCollabVersion() | (id: string) => Promise<boolean> | Inherited from CollabApi. |
diffCollabVersions() | (fromId: string, toId: string | null, options?: CollabVersionDiffOptions) => Promise<DocNodeJSON | null> | Inherited from CollabApi. |
lockRange() | (range?: { from: number; to: number; }) => Promise<CollabLock | null> | Inherited from CollabApi. |
unlockRange() | (id: string) => void | Inherited from CollabApi. |
getLocks() | () => CollabLock[] | Inherited from CollabApi. |
sendableSteps() | () => CollabStepsPayload | null | Inherited from CollabApi. |
receiveSteps() | (payload: CollabRemotePayload) => boolean | Inherited from CollabApi. |
resetCollab() | (snapshot: CollabSnapshot) => void | Inherited from CollabApi. |
getCollaborators() | () => Collaborator[] | Inherited from CollabApi. |
getRibbonTab() | () => string | null | Inherited from RibbonApi. |
setRibbonTab() | (tab: RibbonTabName) => boolean | Inherited from RibbonApi. |
isRibbonCollapsed() | () => boolean | Inherited from RibbonApi. |
setRibbonCollapsed() | (collapsed: boolean) => void | Inherited from RibbonApi. |
getViewMode() | () => DocumentViewMode | Inherited from RibbonApi. |
setViewMode() | (mode: DocumentViewMode) => void | Inherited from RibbonApi. |
fitZoom() | (mode: "width" | "page") => number | Inherited from RibbonApi. |
getTabStops() | () => TabStop[] | Inherited from RibbonApi. |
setTabStops() | (stops: readonly TabStop[]) => boolean | Inherited from RibbonApi. |
whenLayoutReady() | () => Promise<void> | Inherited from LayoutApi. |
isLayoutComplete() | () => boolean | Inherited from LayoutApi. |
getPageInfo() | (page: number) => PageInfo | null | Inherited from LayoutApi. |
getPageText() | (page: number) => string | Inherited from LayoutApi. |
getLayoutStats() | () => LayoutStats | Inherited from LayoutApi. |
getPrintHtml() | () => string | Inherited from LayoutApi. |
exportPdf() | (options?: PdfExportOptions) => Promise<Blob> | Inherited from LayoutApi. |
newDocument() | () => void | Replaces the document with an empty one. Does not ask first. Inherited from FileApi. |
getTemplates() | () => TemplateInfo[] | The templates of New from template: yours first, then the built-in ones. Inherited from FileApi. |
newFromTemplate() | (id: string) => Promise<boolean> | Replaces the document with a copy of a template. Does not ask first. Inherited from FileApi. |
openFile() | (input: Blob | ArrayBuffer | Uint8Array, options?: FileOpenOptions) => Promise<FileImportFormat> | Reads a file in any format the editor imports and shows it. The format is detected from the bytes, then the name. Inherited from FileApi. |
exportFile() | (format: FileExportFormat, options?: FileExportOptions) => Promise<Blob> | A Word file is encrypted with the password of the document, or with password; null writes it without one. Inherited from FileApi. |
setFilePassword() | (password: string | null) => void | Sets or, with null, removes the password that Word files are saved and downloaded with. Inherited from FileApi. |
hasFilePassword() | () => boolean | Inherited from FileApi. |
downloadFile() | (format: FileExportFormat, fileName?: string) => Promise<void> | Inherited from FileApi. |
saveFile() | () => Promise<boolean> | Saves through file.onSaveRequest, or downloads a .docx file when there is none. Inherited from FileApi. |
getFileName() | () => string | Inherited from FileApi. |
setFileName() | (name: string) => void | Inherited from FileApi. |
isModified() | () => boolean | True when the document changed since it was opened, created, saved or downloaded. Inherited from FileApi. |
openFileMenu() | () => boolean | Inherited from FileApi. |
closeFileMenu() | () => void | Inherited from FileApi. |
isFileMenuOpen() | () => boolean | Inherited from FileApi. |
getSources() | () => BibliographySource[] | Inherited from CitationsApi. |
setSources() | (sources: readonly BibliographySource[]) => void | Inherited from CitationsApi. |
addSource() | (source: Omit<BibliographySource, "tag"> & { tag?: string; }) => string | null | Adds a source, or replaces the one with the same tag, and returns its tag. Inherited from CitationsApi. |
removeSource() | (tag: string) => boolean | Inherited from CitationsApi. |
getCitationStyle() | () => CitationStyle | Inherited from CitationsApi. |
setCitationStyle() | (style: CitationStyle) => void | Inherited from CitationsApi. |
insertCitation() | (citation: string | CitationOptions) => boolean | Inherited from CitationsApi. |
insertBibliography() | () => boolean | Inherited from CitationsApi. |
updateCitations() | () => number | Rewrites every citation and bibliography from the sources and returns how many changed. Inherited from CitationsApi. |
checkAccessibility() | (rules?: readonly AccessibilityRule[]) => AccessibilityIssue[] | The accessibility issues of the document, in document order. Inherited from AccessibilityApi. |
getDrawTool() | () => DrawTool | null | Inherited from DrawApi. |
setDrawTool() | (tool: DrawTool | null) => void | Inherited from DrawApi. |
insertInk() | (stroke: Partial<InkStroke> & { points: [number, number][]; }) => boolean | Adds a stroke to the paragraph of the selection; its points are measured from the top left of that paragraph. Inherited from DrawApi. |
getInk() | () => InkInfo[] | Inherited from DrawApi. |
eraseInk() | (pos?: number) => number | Removes the ink stroke at a document position, or every stroke without one. Inherited from DrawApi. |
readAloud() | (options?: ReadAloudOptions) => ReadAloudHandle | Inherited from ReadAloudApi. |
stopReadAloud() | () => void | Inherited from ReadAloudApi. |
isReadingAloud() | () => boolean | Inherited from ReadAloudApi. |
getSpellingIssues() | () => SpellingMatch[] | Inherited from SpellingApi. |
checkSpelling() | () => Promise<void> | Inherited from SpellingApi. |
ignoreSpelling() | (word: string) => void | Inherited from SpellingApi. |
replaceSpelling() | (from: number, text: string) => boolean | Inherited from SpellingApi. |
Defined in packages/document/src/types.ts:939
DocumentEditorEventsinterface#
interface DocumentEditorEvents extends EditingEvents, ObjectsEvents, ReviewEvents, CollabEvents, RibbonEvents, LayoutEvents, FileEvents, CitationsEvents, DrawEvents, ReadAloudEvents| Property | Type | Description |
|---|---|---|
ready | { api: DocumentEditorApi } | — |
contentChange | { source: 'user' | 'api'; wordCount: number } | — |
selectionChange | { from: number; to: number; format: FormatState } | — |
pageCountChange | { pageCount: number } | — |
commentsChange | { comments: CommentThread[] } | — |
trackedChangesChange | { changes: TrackedChange[] } | — |
historyChange | { canUndo: boolean; canRedo: boolean } | — |
readOnlyChange | { readOnly: boolean } | — |
transaction | { steps: unknown[]; origin: 'local' | 'remote'; docChanged: boolean } | — |
focus | { editor: DocumentEditorApi } | — |
blur | { editor: DocumentEditorApi } | — |
autosaveStart | { reason: "change" | "manual" | "destroy"; } | Inherited from EditingEvents. |
autosaveEnd | { savedAt: string; } | Inherited from EditingEvents. |
autosaveError | { error: unknown; } | Inherited from EditingEvents. |
stylesChange | { styles: ParagraphStyleInfo[]; } | Inherited from EditingEvents. |
autocorrectChange | { options: AutocorrectOptions; } | Inherited from EditingEvents. |
formChange | { tag: string; value: unknown; data: Record<string, unknown>; } | Inherited from ObjectsEvents. |
fieldsUpdate | { count: number; } | Inherited from ObjectsEvents. |
embeddedObjectOpen | EmbeddedObjectOpenEvent | Inherited from ObjectsEvents. |
revisionsChange | { revisions: RevisionChange[]; } | Inherited from ReviewEvents. |
markupModeChange | { mode: MarkupMode; } | Inherited from ReviewEvents. |
snapshotsChange | { snapshots: SnapshotInfo[]; } | Inherited from ReviewEvents. |
collabStatus | CollabStatus | Inherited from CollabEvents. |
collabConnection | { status: CollabConnectionStatus; previous: CollabConnectionStatus; } | Inherited from CollabEvents. |
collabRejected | { reason: CollabRejectReason; steps: number; } | Inherited from CollabEvents. |
collabRestored | { steps: number; version: number; } | Inherited from CollabEvents. |
presenceChange | { collaborators: Collaborator[]; } | Inherited from CollabEvents. |
locksChange | { locks: CollabLock[]; } | Inherited from CollabEvents. |
ribbonTabChange | { tab: string; } | Inherited from RibbonEvents. |
viewModeChange | { mode: DocumentViewMode; } | Inherited from RibbonEvents. |
layoutComplete | { pageCount: number; durationMs: number; } | Inherited from LayoutEvents. |
fontsMissing | { fonts: MissingFont[]; } | A font the document uses is not installed. Page breaks match Word only when substitute is not null. Inherited from LayoutEvents. |
fileOpened | { fileName: string; format: FileImportFormat; } | Inherited from FileEvents. |
templateOpened | { id: string; name: string; } | Inherited from FileEvents. |
fileSaved | { fileName: string; format: FileExportFormat | null; target: "download" | "host"; } | Inherited from FileEvents. |
fileError | { action: "open" | "save" | "new"; error: unknown; fileName: string; } | Inherited from FileEvents. |
fileMenuChange | { open: boolean; } | Inherited from FileEvents. |
sourcesChange | { sources: BibliographySource[]; style: CitationStyle; } | Inherited from CitationsEvents. |
drawToolChange | { tool: DrawTool | null; } | Inherited from DrawEvents. |
readAloudChange | { reading: boolean; paused: boolean; } | Inherited from ReadAloudEvents. |
Defined in packages/document/src/types.ts:852
DocumentEditorOptionsinterface#
interface DocumentEditorOptions extends EditingOptions, ObjectsOptions, ReviewOptions, CollabOptions, RibbonOptions, LayoutOptions| Property | Type | Description |
|---|---|---|
licenseKeyoptional | string | — |
injectStylesoptional | boolean | — |
contentoptional | DocumentInput | — |
pageoptional | Partial<PageSetup> | — |
layoutoptional | DocumentLayout | — |
zoomoptional | number | — |
readOnlyoptional | boolean | — |
authoroptional | AuthorInfo | string | — |
trackChangesoptional | boolean | — |
showMarkupoptional | boolean | — |
toolbaroptional | boolean | readonly ToolbarItemId[] | — |
statusBaroptional | boolean | — |
ruleroptional | boolean | — |
outlineoptional | boolean | — |
commentsPaneloptional | boolean | — |
spellcheckoptional | boolean | SpellChecker | — |
limitsoptional | Partial<ZipLimits> | Caps applied to every DOCX archive the editor opens. Defaults: 10,000 entries, 512 MiB per entry, 1 GiB in total, 200:1. |
linkSchemesoptional | readonly string[] | Schemes whose links may be followed, besides http, https, mailto and tel: for example
['file', 'ftp', 'sms', 'msteams']. Links with any other scheme stay in the document and in saved files but are
shown as blocked addresses. javascript, vbscript and data can never be enabled. Read when the editor is
created. |
allowRemoteImagesoptional | boolean | Draw pictures whose source is an http(s) or relative URL. Off by default, so opening a document makes no request. |
resolveImageoptional | (url: string) => string | null | Promise<string | null> | Returns a data:image/… URL for a remote picture, fetched by your application. Used when allowRemoteImages is off. |
placeholderoptional | string | — |
fontsoptional | readonly string[] | — |
fontSizesoptional | readonly number[] | — |
mergeFieldsoptional | readonly MergeFieldDefinition[] | — |
heightoptional | number | string | — |
ariaLabeloptional | string | — |
announcementsoptional | boolean | AnnouncementOptions | — |
localeTextoptional | LocaleTextInput | — |
rtloptional | boolean | — |
uploadImageoptional | (file: File) => Promise<string> | — |
chartProvideroptional | ChartProvider | — |
readAloudoptional | ReadAloudOptions | Defaults for Read aloud: a callback that speaks each sentence, a language and a rate. |
fileoptional | boolean | FileOptions | The File tab: false removes it, an object hides entries or routes New, Open and Save to your application. |
autocorrectoptional | boolean | AutocorrectOptions | undefined | Inherited from EditingOptions. |
autocorrectStorageoptional | AutocorrectStorage | undefined | Inherited from EditingOptions. |
autosaveoptional | AutosaveOptions | undefined | Inherited from EditingOptions. |
pasteOptionsoptional | boolean | undefined | Inherited from EditingOptions. |
clickAndTypeoptional | boolean | undefined | Inherited from EditingOptions. |
defaultPasteModeoptional | PasteMode | undefined | Inherited from EditingOptions. |
resolvePastedImageoptional | ((src: string, context: PastedImageContext) => string | null | Promise<string | null>) | undefined | Inherited from EditingOptions. |
showFormattingMarksoptional | boolean | undefined | Inherited from EditingOptions. |
hyphenationoptional | boolean | undefined | Inherited from EditingOptions. |
formModeoptional | boolean | undefined | Inherited from ObjectsOptions. |
showBookmarksoptional | boolean | undefined | Inherited from ObjectsOptions. |
noteNumberFormatoptional | Partial<Record<NoteKind, NoteNumberFormat>> | undefined | Inherited from ObjectsOptions. |
mergeRecordsoptional | readonly Record<string, unknown>[] | undefined | Inherited from ObjectsOptions. |
markupModeoptional | MarkupMode | undefined | Inherited from ReviewOptions. |
changeBarsoptional | boolean | undefined | Inherited from ReviewOptions. |
changeBalloonsoptional | boolean | undefined | Inherited from ReviewOptions. |
commentsLayoutoptional | "margin" | "panel" | undefined | Inherited from ReviewOptions. |
mentionsoptional | MentionOptions | undefined | Inherited from ReviewOptions. |
snapshotsoptional | SnapshotStorage | undefined | Inherited from ReviewOptions. |
collaboptional | CollabProvider | null | undefined | Inherited from CollabOptions. |
collabStorageoptional | CollabOfflineStore | null | undefined | Where edits that have not reached the authority are kept. Without it they live in memory and are lost when the
tab closes. createIndexedDbOfflineStore({ key }) keeps them across a reload. Inherited from CollabOptions. |
ribbonoptional | boolean | RibbonConfig | undefined | Inherited from RibbonOptions. |
miniToolbaroptional | boolean | undefined | Inherited from RibbonOptions. |
viewModeoptional | DocumentViewMode | undefined | Inherited from RibbonOptions. |
themeoptional | "auto" | "light" | "dark" | undefined | Inherited from RibbonOptions. |
darkPageoptional | "dark" | "white" | undefined | Inherited from RibbonOptions. |
verticalRuleroptional | boolean | undefined | Inherited from RibbonOptions. |
commandSearchoptional | boolean | undefined | The Search commands box of the tab row and its Alt+Q shortcut. On by default. Inherited from RibbonOptions. |
layoutCompatibilityoptional | LayoutCompatibility | undefined | Inherited from LayoutOptions. |
virtualizeoptional | boolean | "auto" | undefined | Inherited from LayoutOptions. |
pdfFontsoptional | readonly PdfFontSource[] | undefined | Inherited from LayoutOptions. |
isFontAvailableoptional | ((family: string) => boolean) | undefined | Replaces the built-in check of whether a font family can be drawn on this device. Inherited from LayoutOptions. |
Defined in packages/document/src/types.ts:804
DocumentPdfOptionsinterface#
interface DocumentPdfOptions extends PdfWriteOptions| Property | Type | Description |
|---|---|---|
fontsoptional | readonly PdfFontSource[] | — |
titleoptional | string | — |
authoroptional | string | — |
subjectoptional | string | — |
keywordsoptional | string | — |
languageoptional | string | — |
outlineoptional | boolean | — |
compressoptional | boolean | undefined | Inherited from PdfWriteOptions. |
creationDateoptional | Date | undefined | Inherited from PdfWriteOptions. |
produceroptional | string | undefined | Inherited from PdfWriteOptions. |
pdfAoptional | boolean | undefined | Inherited from PdfWriteOptions. |
taggedoptional | boolean | undefined | Inherited from PdfWriteOptions. |
Defined in packages/document/src/layout/pdf/document-layout.ts:28
DocumentPdfResultinterface#
interface DocumentPdfResult| Property | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
warnings | string[] | — |
pageCount | number | — |
missingFonts | string[] | Font families the document asks for that had no font file and no metric-compatible substitute. |
Defined in packages/document/src/layout/pdf/document-layout.ts:38
DocumentPersoninterface#
interface DocumentPerson| Property | Type | Description |
|---|---|---|
author | string | — |
providerIdoptional | string | — |
userIdoptional | string | — |
Defined in packages/document/src/types.ts:152
DocumentPropertiesinterface#
interface DocumentProperties| Property | Type | Description |
|---|---|---|
titleoptional | string | — |
subjectoptional | string | — |
authoroptional | string | — |
keywordsoptional | string | — |
descriptionoptional | string | — |
createdoptional | string | — |
modifiedoptional | string | — |
categoryoptional | string | — |
lastModifiedByoptional | string | — |
revisionoptional | string | — |
companyoptional | string | — |
manageroptional | string | — |
customoptional | Record<string, string | number | boolean> | — |
Defined in packages/document/src/types.ts:158
DocumentProtectioninterface#
interface DocumentProtection| Property | Type | Description |
|---|---|---|
mode | ProtectionMode | — |
enforced | boolean | — |
attrsoptional | Record<string, string> | — |
Defined in packages/document/src/types.ts:176
DocumentSectioninterface#
interface DocumentSection| Property | Type | Description |
|---|---|---|
index | number | — |
page | PageSetup | — |
headers | Required<SectionHeaders> | — |
from | number | — |
to | number | — |
Defined in packages/document/src/types.ts:111
DocumentSettingsinterface#
interface DocumentSettings| Property | Type | Description |
|---|---|---|
evenAndOddHeadersoptional | boolean | — |
mirrorMarginsoptional | boolean | — |
trackRevisionsoptional | boolean | — |
defaultTabStopoptional | number | — |
protectionoptional | DocumentProtection | null | — |
footnotesoptional | NoteSettings | — |
endnotesoptional | NoteSettings | — |
compatibilityModeoptional | number | — |
compatoptional | CompatibilitySettings | — |
kerningoptional | boolean | False when the document's default text has Word's "Kerning for fonts" switched off, which is the case for most Word documents. Text is then laid out without pair kerning, as Word does, unless a run switches it on. |
Defined in packages/document/src/types.ts:194
DocumentSnapshotinterface#
interface DocumentSnapshotDefined in packages/document/src/editor/review/types.ts:73
DocumentStyleinterface#
interface DocumentStyle| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
type | DocumentStyleType | — |
basedOnoptional | string | — |
nextoptional | string | — |
linkoptional | string | — |
isDefaultoptional | boolean | — |
isQuickStyleoptional | boolean | — |
builtinoptional | ParagraphStyleId | — |
outlineLeveloptional | number | — |
numberingoptional | { numId: number; level: number } | — |
paragraphoptional | Record<string, unknown> | — |
runoptional | Record<string, unknown> | — |
tableoptional | Record<string, unknown> | — |
Defined in packages/document/src/types.ts:213
DocumentTemplateinterface#
interface DocumentTemplate| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
descriptionoptional | string | — |
iconoptional | string | The name of an icon of the editor; a page icon when left out. |
content | DocumentInput | (() => DocumentInput | Promise<DocumentInput>) | The document, or a function that returns it or a promise of it, for templates that are fetched when chosen. |
Defined in packages/document/src/editor/file/types.ts:34
DocxImportFeatureinterface#
interface DocxImportFeatureDefined in packages/document/src/docx/report.ts:1
DocxImportReportinterface#
interface DocxImportReport| Property | Type | Description |
|---|---|---|
modelled | DocxImportFeature[] | — |
preserved | DocxImportFeature[] | — |
dropped | DocxImportFeature[] | — |
Defined in packages/document/src/docx/report.ts:7
DocxPackageinterface#
interface DocxPackage| Property | Type | Description |
|---|---|---|
parts | Record<string, PreservedPart> | — |
contentTypes | { defaults: Record<string, string>; overrides: Record<string, string> } | — |
namespaces | Record<string, string> | — |
ignorable | string[] | — |
mainPart | string | — |
relationshipsoptional | PreservedRelationship[] | — |
sourceoptional | DocxSource | null | — |
Defined in packages/document/src/types.ts:240
DocxPageMapinterface#
interface DocxPageMap| Property | Type | Description |
|---|---|---|
bookmarksoptional | Readonly<Record<string, number>> | — |
headingsoptional | readonly number[] | — |
headerFooteroptional | Readonly<Partial<Record<'default' | 'first' | 'even', number>>> | — |
Defined in packages/document/src/docx/writer.ts:84
DocxReadOptionsinterface#
interface DocxReadOptions| Property | Type | Description |
|---|---|---|
limitsoptional | Partial<ZipLimits> | Caps on the archive: entry count, inflated size of one entry, total inflated size and compression ratio. |
Defined in packages/document/src/docx/reader.ts:442
DocxReadResultinterface#
interface DocxReadResult| Property | Type | Description |
|---|---|---|
document | DocumentData | — |
warnings | string[] | — |
report | DocxImportReport | — |
Defined in packages/document/src/docx/reader.ts:367
DocxValidationIssueinterface#
interface DocxValidationIssueDefined in packages/document/src/docx/validate.ts:7
DocxValidationResultinterface#
interface DocxValidationResult| Property | Type | Description |
|---|---|---|
ok | boolean | — |
issues | DocxValidationIssue[] | — |
Defined in packages/document/src/docx/validate.ts:14
DocxWriteOptionsinterface#
interface DocxWriteOptions| Property | Type | Description |
|---|---|---|
trackRevisionsoptional | boolean | — |
zoomoptional | number | — |
pageCountoptional | number | — |
pagesoptional | DocxPageMap | — |
compressoptional | boolean | — |
nowoptional | Date | — |
preserveSourceoptional | boolean | 'exact' | — |
Defined in packages/document/src/docx/writer.ts:90
DrawApiinterface#
interface DrawApi| Member | Type | Description |
|---|---|---|
getDrawTool() | () => DrawTool | null | — |
setDrawTool() | (tool: DrawTool | null) => void | — |
insertInk() | (stroke: Partial<InkStroke> & { points: [number, number][] }) => boolean | Adds a stroke to the paragraph of the selection; its points are measured from the top left of that paragraph. |
getInk() | () => InkInfo[] | — |
eraseInk() | (pos?: number) => number | Removes the ink stroke at a document position, or every stroke without one. |
Defined in packages/document/src/editor/draw/index.ts:31
DrawEventsinterface#
interface DrawEvents| Property | Type | Description |
|---|---|---|
drawToolChange | { tool: DrawTool | null } | — |
Defined in packages/document/src/editor/draw/index.ts:43
EditingApiinterface#
interface EditingApi| Member | Type | Description |
|---|---|---|
openPane() | (id: string) => boolean | — |
closePane() | (id: string) => boolean | — |
isPaneOpen() | (id: string) => boolean | — |
getStyles() | () => ParagraphStyleInfo[] | — |
applyStyle() | (id: string) => boolean | — |
createStyle() | (name: string, format?: StyleFormat, basedOn?: string) => string | null | — |
createStyleFromSelection() | (name: string) => string | null | — |
modifyStyle() | (id: string, format: StyleFormat, name?: string) => boolean | — |
updateStyleToMatchSelection() | (id: string) => boolean | — |
deleteStyle() | (id: string) => boolean | — |
getFontFormat() | () => Required<FontFormat> | — |
setFontFormat() | (format: FontFormat) => boolean | — |
getDocumentProperties() | () => DocumentProperties | — |
setDocumentProperties() | (properties: { [K in keyof DocumentProperties]?: DocumentProperties[K] | null }) => boolean | — |
getAutocorrectOptions() | () => Required<AutocorrectOptions> | null | — |
setAutocorrectOptions() | (options: AutocorrectOptions) => boolean | — |
setHyperlink() | (options: HyperlinkOptions | null) => boolean | — |
setParagraphFormat() | (format: ParagraphFormat) => boolean | — |
setParagraphBorders() | (borders: ParagraphBorders | null, shading?: string | null) => boolean | — |
changeCase() | (mode: CaseMode) => boolean | — |
setDropCap() | (mode: 'none' | 'drop' | 'margin', lines?: number) => boolean | — |
collapseHeading() | (index: number, collapsed: boolean) => boolean | — |
isHeadingCollapsed() | (index: number) => boolean | — |
moveSection() | (index: number, targetIndex: number) => boolean | — |
getDetailedWordCount() | () => DetailedWordCount | — |
getFindResults() | (query: string, options?: FindOptions) => FindPaneResult[] | — |
getListDefinitions() | () => MultilevelListDefinition[] | — |
getListLevels() | () => ListLevelFormat[] | null | The levels of the Word list that holds the cursor, or null when the cursor is not in a list from a Word file. |
setListLevels() | (levels: readonly ListLevelFormat[]) => boolean | Changes the levels of the Word list that holds the cursor; every list that uses the same definition follows. |
defineMultilevelList() | (definition: Omit<MultilevelListDefinition, 'id'> & { id?: string }) => string | — |
pasteHtml() | (html: string, mode?: PasteMode) => boolean | — |
saveNow() | () => Promise<void> | — |
isSaving() | () => boolean | — |
getWatermark() | () => Watermark | null | — |
setWatermark() | (watermark: Watermark | string | null) => boolean | — |
getLineNumbers() | () => LineNumbering | null | — |
setLineNumbers() | (numbering: LineNumbering | boolean | null) => boolean | — |
getColumns() | () => ColumnSettings | — |
setColumns() | (columns: ColumnSettings | number) => boolean | — |
insertBreak() | (kind: BreakKind) => boolean | — |
Defined in packages/document/src/editor/editing/types.ts:279
EditingEventsinterface#
interface EditingEvents| Property | Type | Description |
|---|---|---|
autosaveStart | { reason: 'change' | 'manual' | 'destroy' } | — |
autosaveEnd | { savedAt: string } | — |
autosaveError | { error: unknown } | — |
stylesChange | { styles: ParagraphStyleInfo[] } | — |
autocorrectChange | { options: AutocorrectOptions } | — |
Defined in packages/document/src/editor/editing/types.ts:271
EditingOptionsinterface#
interface EditingOptions| Property | Type | Description |
|---|---|---|
autocorrectoptional | boolean | AutocorrectOptions | — |
autocorrectStorageoptional | AutocorrectStorage | — |
autosaveoptional | AutosaveOptions | — |
pasteOptionsoptional | boolean | — |
clickAndTypeoptional | boolean | — |
defaultPasteModeoptional | PasteMode | — |
resolvePastedImageoptional | (src: string, context: PastedImageContext) => string | null | Promise<string | null> | — |
showFormattingMarksoptional | boolean | — |
hyphenationoptional | boolean | — |
Defined in packages/document/src/editor/editing/types.ts:259
EmbeddedObjectFileinterface#
interface EmbeddedObjectFileDefined in packages/document/src/docx/embedded.ts:30
EmbeddedObjectInfointerface#
interface EmbeddedObjectInfo extends EmbeddedObjectOpenEvent| Property | Type | Description |
|---|---|---|
pos | number | — |
asIcon | boolean | — |
kind | FileKind | — |
fileName | string | Inherited from EmbeddedObjectOpenEvent. |
mimeType | string | Inherited from EmbeddedObjectOpenEvent. |
progId | string | Inherited from EmbeddedObjectOpenEvent. |
data | Uint8Array<ArrayBufferLike> | Inherited from EmbeddedObjectOpenEvent. |
Defined in packages/document/src/editor/objects/types.ts:252
EmbeddedObjectInputinterface#
interface EmbeddedObjectInput| Property | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
fileName | string | — |
mimeTypeoptional | string | — |
asIconoptional | boolean | — |
iconoptional | string | — |
widthoptional | number | — |
heightoptional | number | — |
Defined in packages/document/src/docx/embedded.ts:20
EmbeddedObjectOpenEventinterface#
interface EmbeddedObjectOpenEventDefined in packages/document/src/editor/objects/types.ts:245
FieldContextinterface#
interface FieldContext| Property | Type | Description |
|---|---|---|
nowoptional | Date | — |
valuesoptional | Record<string, unknown> | — |
pagesoptional | Record<string, number> | — |
pageCountoptional | number | — |
Defined in packages/document/src/model/fields.ts:37
FileApiinterface#
interface FileApi| Member | Type | Description |
|---|---|---|
newDocument() | () => void | Replaces the document with an empty one. Does not ask first. |
getTemplates() | () => TemplateInfo[] | The templates of New from template: yours first, then the built-in ones. |
newFromTemplate() | (id: string) => Promise<boolean> | Replaces the document with a copy of a template. Does not ask first. |
openFile() | (input: Blob | ArrayBuffer | Uint8Array, options?: FileOpenOptions) => Promise<FileImportFormat> | Reads a file in any format the editor imports and shows it. The format is detected from the bytes, then the name. |
exportFile() | (format: FileExportFormat, options?: FileExportOptions) => Promise<Blob> | A Word file is encrypted with the password of the document, or with password; null writes it without one. |
setFilePassword() | (password: string | null) => void | Sets or, with null, removes the password that Word files are saved and downloaded with. |
hasFilePassword() | () => boolean | — |
downloadFile() | (format: FileExportFormat, fileName?: string) => Promise<void> | — |
saveFile() | () => Promise<boolean> | Saves through file.onSaveRequest, or downloads a .docx file when there is none. |
getFileName() | () => string | — |
setFileName() | (name: string) => void | — |
isModified() | () => boolean | True when the document changed since it was opened, created, saved or downloaded. |
openFileMenu() | () => boolean | — |
closeFileMenu() | () => void | — |
isFileMenuOpen() | () => boolean | — |
Defined in packages/document/src/editor/file/types.ts:98
FileEventsinterface#
interface FileEvents| Property | Type | Description |
|---|---|---|
fileOpened | { fileName: string; format: FileImportFormat } | — |
templateOpened | { id: string; name: string } | — |
fileSaved | { fileName: string; format: FileExportFormat | null; target: 'download' | 'host' } | — |
fileError | { action: 'open' | 'save' | 'new'; error: unknown; fileName: string } | — |
fileMenuChange | { open: boolean } | — |
Defined in packages/document/src/editor/file/types.ts:86
FileExportOptionsinterface#
interface FileExportOptions| Property | Type | Description |
|---|---|---|
passwordoptional | string | null | — |
Defined in packages/document/src/editor/file/types.ts:94
FileIconSvgOptionsinterface#
interface FileIconSvgOptionsDefined in packages/document/src/docx/file-icon.ts:136
FileOpenOptionsinterface#
interface FileOpenOptions| Property | Type | Description |
|---|---|---|
fileNameoptional | string | — |
passwordoptional | string | The password of a password-protected Word file. |
formatoptional | FileImportFormat | Skips detection and reads the file as this format. |
Defined in packages/document/src/editor/file/types.ts:76
FileOptionsinterface#
interface FileOptions| Property | Type | Description |
|---|---|---|
templatesoptional | readonly DocumentTemplate[] | Templates of your own for New from template, listed before the built-in ones. |
builtinTemplatesoptional | boolean | false leaves out the four built-in templates (letter, report, meeting notes, résumé). |
fileNameoptional | string | The name used for downloads, without an extension. Defaults to the title of the document. |
onNewRequestoptional | (request: FileRequest) => FileRequestResult | Runs instead of emptying the editor when the user asks for a new document. Return false to let the editor do it. |
onOpenRequestoptional | (request: FileRequest) => FileRequestResult | Runs instead of the browser's file chooser when the user asks to open a file. Return false to show the chooser. |
onSaveRequestoptional | (request: FileRequest) => FileRequestResult | Runs on Save and Ctrl+S instead of downloading a .docx file. Return false to download. |
Defined in packages/document/src/editor/file/types.ts:59
FileRequestinterface#
interface FileRequest| Property | Type | Description |
|---|---|---|
editor | DocumentEditorApi | — |
fileName | string | The name of the document without an extension. |
Defined in packages/document/src/editor/file/types.ts:51
FileTypeInfointerface#
interface FileTypeInfo| Property | Type | Description |
|---|---|---|
kind | FileKind | — |
label | FileTypeLabel | — |
extension | string | Lower-case extension without the dot; empty when nothing is known. |
badge | string | Up to four upper-case characters for the icon. |
mimeType | string | — |
source | FileTypeSource | — |
Defined in packages/document/src/docx/file-type.ts:28
FileTypeInputinterface#
interface FileTypeInput| Property | Type | Description |
|---|---|---|
progIdoptional | string | null | — |
fileNameoptional | string | null | — |
mimeTypeoptional | string | null | — |
partNameoptional | string | null | — |
dataoptional | Uint8Array | null | — |
Defined in packages/document/src/docx/file-type.ts:39
FindOptionsinterface#
interface FindOptions| Property | Type | Description |
|---|---|---|
matchCaseoptional | boolean | — |
wholeWordoptional | boolean | — |
regexoptional | boolean | — |
wildcardsoptional | boolean | — |
formatoptional | FindFormat | — |
Defined in packages/document/src/types.ts:628
FindPaneResultinterface#
interface FindPaneResultDefined in packages/document/src/editor/editing/types.ts:218
FindResultinterface#
interface FindResultDefined in packages/document/src/types.ts:636
FontFormatinterface#
interface FontFormat| Property | Type | Description |
|---|---|---|
fontFamilyoptional | string | null | — |
fontSizeoptional | number | null | — |
boldoptional | boolean | — |
italicoptional | boolean | — |
coloroptional | string | null | — |
underlineoptional | UnderlineStyle | 'none' | null | — |
underlineColoroptional | string | null | — |
strikeoptional | boolean | — |
doubleStrikeoptional | boolean | — |
superscriptoptional | boolean | — |
subscriptoptional | boolean | — |
smallCapsoptional | boolean | — |
allCapsoptional | boolean | — |
spacingoptional | number | null | — |
scaleoptional | number | null | — |
positionoptional | number | null | — |
kerningoptional | number | null | — |
Defined in packages/document/src/editor/editing/types.ts:99
FootnoteInfointerface#
interface FootnoteInfo| Property | Type | Description |
|---|---|---|
id | string | — |
kind | NoteKind | — |
number | number | — |
label | string | — |
pos | number | — |
content | DocNodeJSON[] | — |
Defined in packages/document/src/editor/objects/types.ts:165
FormatStateinterface#
interface FormatState| Property | Type | Description |
|---|---|---|
bold | boolean | — |
italic | boolean | — |
underline | boolean | — |
strike | boolean | — |
superscript | boolean | — |
subscript | boolean | — |
fontFamily | string | null | — |
fontSize | number | null | — |
textColor | string | null | — |
highlight | string | null | — |
link | string | null | — |
paragraphStyle | string | — |
align | TextAlignment | — |
lineSpacing | number | null | — |
bulletList | boolean | — |
orderedList | boolean | — |
inTable | boolean | — |
imageSelected | boolean | — |
direction | 'ltr' | 'rtl' | — |
Defined in packages/document/src/types.ts:733
FormFieldErrorinterface#
interface FormFieldErrorDefined in packages/document/src/editor/objects/types.ts:222
HeaderFooterContentinterface#
interface HeaderFooterContent| Property | Type | Description |
|---|---|---|
header | DocNodeJSON | null | — |
footer | DocNodeJSON | null | — |
firstHeader | DocNodeJSON | null | — |
firstFooter | DocNodeJSON | null | — |
Defined in packages/document/src/types.ts:434
HtmlDocumentOptionsinterface#
interface HtmlDocumentOptions| Property | Type | Description |
|---|---|---|
fullDocumentoptional | boolean | — |
titleoptional | string | — |
includeDeletedoptional | boolean | — |
linkSchemesoptional | readonly string[] | Schemes written as links that can be followed, besides http, https, mailto and tel. |
Defined in packages/document/src/formats/html.ts:23
HtmlExportOptionsinterface#
interface HtmlExportOptions| Property | Type | Description |
|---|---|---|
fullDocumentoptional | boolean | — |
titleoptional | string | — |
Defined in packages/document/src/types.ts:907
HyperlinkOptionsinterface#
interface HyperlinkOptions| Property | Type | Description |
|---|---|---|
href | string | — |
textoptional | string | — |
titleoptional | string | null | — |
headingPosoptional | number | — |
Defined in packages/document/src/editor/editing/types.ts:120
ImageAnchorinterface#
interface ImageAnchor| Property | Type | Description |
|---|---|---|
x | number | — |
y | number | — |
horizontalRelative | string | — |
verticalRelative | string | — |
horizontalAlignoptional | string | null | — |
verticalAlignoptional | string | null | — |
wrapSideoptional | string | null | — |
wrapPolygonoptional | [number, number][] | null | — |
distanceoptional | { top: number; right: number; bottom: number; left: number } | — |
allowOverlapoptional | boolean | — |
layoutInCelloptional | boolean | — |
lockedoptional | boolean | — |
zIndexoptional | number | — |
Defined in packages/document/src/types.ts:369
ImageBorderinterface#
interface ImageBorder| Property | Type | Description |
|---|---|---|
width | number | — |
color | string | — |
styleoptional | 'solid' | 'dashed' | 'dotted' | — |
shadowoptional | boolean | — |
Defined in packages/document/src/types.ts:404
ImageCropinterface#
interface ImageCropDefined in packages/document/src/types.ts:422
ImageEffectsinterface#
interface ImageEffects| Property | Type | Description |
|---|---|---|
brightnessoptional | number | From -100 to 100; 0 leaves the picture as it is. |
contrastoptional | number | — |
recoloroptional | ImageRecolor | — |
shapeoptional | ImageShapePreset | — |
Defined in packages/document/src/types.ts:414
InkInfointerface#
interface InkInfoDefined in packages/document/src/editor/draw/index.ts:24
InkStrokeinterface#
interface InkStroke| Property | Type | Description |
|---|---|---|
tool | InkTool | — |
color | string | — |
width | number | Line width in pixels at 100% zoom. |
points | [number, number][] | Points in pixels, relative to the top left corner of the drawing. |
Defined in packages/document/src/types.ts:443
InsertEmbeddedObjectOptionsinterface#
interface InsertEmbeddedObjectOptions| Property | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
fileName | string | — |
mimeTypeoptional | string | — |
asIconoptional | boolean | — |
iconoptional | string | — |
widthoptional | number | — |
heightoptional | number | — |
Defined in packages/document/src/editor/objects/types.ts:235
InsertImageOptionsinterface#
interface InsertImageOptionsDefined in packages/document/src/types.ts:883
InsertShapeValueinterface#
interface InsertShapeValue| Property | Type | Description |
|---|---|---|
shape | ShapeKind | — |
widthoptional | number | — |
heightoptional | number | — |
filloptional | string | null | — |
strokeoptional | string | null | — |
strokeWidthoptional | number | — |
textoptional | string | — |
Defined in packages/document/src/editor/objects/types.ts:152
LayoutApiinterface#
interface LayoutApi| Member | Type | Description |
|---|---|---|
whenLayoutReady() | () => Promise<void> | — |
isLayoutComplete() | () => boolean | — |
getPageInfo() | (page: number) => PageInfo | null | — |
getPageText() | (page: number) => string | — |
getLayoutStats() | () => LayoutStats | — |
getPrintHtml() | () => string | — |
exportPdf() | (options?: PdfExportOptions) => Promise<Blob> | — |
Defined in packages/document/src/layout/types.ts:69
LayoutBlockinterface#
interface LayoutBlock| Property | Type | Description |
|---|---|---|
kind | LayoutBlockKind | — |
height | number | — |
paddingTopoptional | number | — |
paddingBottomoptional | number | — |
partsoptional | readonly number[] | — |
repeatHeaderoptional | number | — |
headerRowsoptional | number | How many leading rows repeatHeader covers. One when absent. |
keepWithNextoptional | boolean | — |
pageBreakBeforeoptional | boolean | — |
keepLinesoptional | boolean | — |
widowControloptional | boolean | — |
extentoptional | number | — |
topSpaceoptional | number | — |
trimTopoptional | number | — |
lineSlackoptional | number | — |
tailoptional | number | — |
needsoptional | number | — |
rowSlackoptional | readonly number[] | — |
keepRowsoptional | readonly boolean[] | — |
rowsoptional | readonly (LayoutRow | undefined)[] | — |
notesoptional | readonly LayoutNote[] | — |
sectionoptional | number | — |
Defined in packages/document/src/layout/paginate-cursor.ts:23
LayoutBreakinterface#
interface LayoutBreak| Property | Type | Description |
|---|---|---|
block | number | — |
part | number | — |
page | number | — |
flowY | number | — |
extra | number | — |
kind | LayoutBreakKind | — |
fromPage | number | — |
fromOffset | number | — |
target | number | — |
column | number | — |
cellsoptional | readonly number[] | — |
slackoptional | readonly number[] | — |
trimoptional | number | — |
Defined in packages/document/src/layout/paginate-cursor.ts:79
LayoutEventsinterface#
interface LayoutEvents| Property | Type | Description |
|---|---|---|
layoutComplete | { pageCount: number; durationMs: number } | — |
fontsMissing | { fonts: MissingFont[] } | A font the document uses is not installed. Page breaks match Word only when substitute is not null. |
Defined in packages/document/src/layout/types.ts:37
LayoutOptionsinterface#
interface LayoutOptions| Property | Type | Description |
|---|---|---|
layoutCompatibilityoptional | LayoutCompatibility | — |
virtualizeoptional | boolean | 'auto' | — |
pdfFontsoptional | readonly PdfFontSource[] | — |
isFontAvailableoptional | (family: string) => boolean | Replaces the built-in check of whether a font family can be drawn on this device. |
Defined in packages/document/src/layout/types.ts:29
LayoutStatsinterface#
interface LayoutStats| Property | Type | Description |
|---|---|---|
pages | number | — |
blocks | number | — |
measured | number | — |
cacheHits | number | — |
lastLayoutMs | number | — |
passes | number | — |
complete | boolean | — |
virtualized | boolean | — |
reuseoptional | { resumedPage: number; convergedPage: number } | — |
Defined in packages/document/src/layout/types.ts:57
LineNumberinginterface#
interface LineNumbering| Property | Type | Description |
|---|---|---|
countByoptional | number | — |
startoptional | number | — |
restartoptional | 'continuous' | 'newPage' | — |
distanceoptional | number | — |
Defined in packages/document/src/editor/editing/types.ts:245
ListLevelFormatinterface#
interface ListLevelFormat| Property | Type | Description |
|---|---|---|
numberStyle | 'decimal' | 'lowerAlpha' | 'upperAlpha' | 'lowerRoman' | 'upperRoman' | 'bullet' | — |
format | string | — |
bulletoptional | string | — |
indent | number | — |
startoptional | number | — |
restartAfteroptional | number | — |
legaloptional | boolean | — |
linkedStyleoptional | string | — |
alignoptional | 'left' | 'center' | 'right' | — |
alignedAtoptional | number | — |
textIndentoptional | number | — |
followoptional | 'tab' | 'space' | 'nothing' | — |
Defined in packages/document/src/editor/editing/types.ts:152
LoopbackConnectioninterface#
interface LoopbackConnection extends CollabProvider| Property | Type | Description |
|---|---|---|
clientId | CollabClientId | — |
version | () => number | — |
metaVersion | () => number | — |
requestSteps() | (sinceVersion: number, sinceMeta?: number) => void | — |
presence | CollabPresenceChannel | — |
comments | CollabCommentChannel | — |
versions | CollabVersionChannel | — |
locks | CollabLockChannel | — |
snapshots | CollabSnapshotChannel | — |
setOnline() | (online: boolean) => void | — |
setConnection() | (status: CollabConnectionStatus) => void | — |
isOnline() | () => boolean | — |
reset() | (snapshot: CollabSnapshot) => void | — |
disconnect() | () => void | — |
sendSteps() | (payload: CollabStepsPayload) => CollabSendResult | Promise<CollabSendResult> | Inherited from CollabProvider. |
onRemoteSteps() | (handler: (payload: CollabRemotePayload) => void) => () => void | Inherited from CollabProvider. |
onStatus()optional | ((handler: (status: "online" | "offline") => void) => () => void) | undefined | Inherited from CollabProvider. |
onConnection()optional | ((handler: (status: CollabConnectionStatus) => void) => () => void) | undefined | Inherited from CollabProvider. |
onReset()optional | ((handler: (snapshot: CollabSnapshot) => void) => () => void) | undefined | Inherited from CollabProvider. |
presenceTimeoutoptional | number | undefined | Inherited from CollabProvider. |
Defined in packages/document/src/editor/collab/types.ts:439
LoopbackHubinterface#
interface LoopbackHub| Property | Type | Description |
|---|---|---|
connect() | (clientId: CollabClientId) => LoopbackConnection | — |
version() | () => number | — |
getDocumentSteps() | () => { step: unknown; clientId: CollabClientId }[] | — |
authority() | () => CollabAuthority | — |
pending() | () => number | — |
step() | () => boolean | — |
flush() | (limit?: number) => number | — |
destroy() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:456
LoopbackHubOptionsinterface#
interface LoopbackHubOptions extends CollabAuthorityOptions| Property | Type | Description |
|---|---|---|
latencyoptional | number | — |
jitteroptional | number | — |
dropRateoptional | number | — |
manualoptional | boolean | — |
randomoptional | () => number | — |
documentoptional | DocumentInput | null | undefined | The document at version 0. Without it, and without snapshot, the authority starts from an empty document. Inherited from CollabAuthorityOptions. |
limitsoptional | Partial<CollabDocumentLimits> | undefined | Inherited from CollabAuthorityOptions. |
trustClientsoptional | boolean | undefined | Relay steps without applying them. Only for a process where every client is your own code, such as a unit test of a transport: a client can then store any document and move any lock. Inherited from CollabAuthorityOptions. |
snapshotoptional | CollabSnapshot | null | undefined | Inherited from CollabAuthorityOptions. |
snapshotEveryoptional | number | undefined | Inherited from CollabAuthorityOptions. |
retainStepsoptional | number | undefined | Inherited from CollabAuthorityOptions. |
versionsoptional | readonly CollabStoredVersion[] | null | undefined | Named versions saved earlier, as storedVersions() returned them. Inherited from CollabAuthorityOptions. |
nowoptional | (() => number) | undefined | Inherited from CollabAuthorityOptions. |
createIdoptional | (() => string) | undefined | Inherited from CollabAuthorityOptions. |
Defined in packages/document/src/editor/collab/types.ts:431
MarkdownOptionsinterface#
interface MarkdownOptions| Property | Type | Description |
|---|---|---|
includeDeletedoptional | boolean | — |
Defined in packages/document/src/formats/markdown.ts:21
MarkupVisibilityinterface#
interface MarkupVisibility| Property | Type | Description |
|---|---|---|
insertionsAndDeletions | boolean | — |
formatting | boolean | — |
comments | boolean | — |
Defined in packages/document/src/editor/review/types.ts:49
MentionEventinterface#
interface MentionEventDefined in packages/document/src/editor/review/types.ts:62
MentionOptionsinterface#
interface MentionOptions| Property | Type | Description |
|---|---|---|
search() | (query: string) => Promise<Person[]> | Person[] | — |
onMention()optional | (event: MentionEvent) => void | — |
Defined in packages/document/src/editor/review/types.ts:68
MergeFieldDefinitioninterface#
interface MergeFieldDefinitionDefined in packages/document/src/types.ts:649
MergeOptionsinterface#
interface MergeOptions| Property | Type | Description |
|---|---|---|
missingoptional | 'empty' | 'keep' | 'placeholder' | — |
localeoptional | string | — |
currencyoptional | string | — |
Defined in packages/document/src/types.ts:643
MetafileOptionsinterface#
interface MetafileOptions| Property | Type | Description |
|---|---|---|
embeddedEmfoptional | boolean | — |
Defined in packages/document/src/docx/metafile.ts:580
MissingFontinterface#
interface MissingFont| Property | Type | Description |
|---|---|---|
family | string | — |
substitute | string | null | The metric-compatible font that is installed and drawn instead, or null when there is none. |
Defined in packages/document/src/layout/types.ts:23
MultilevelListDefinitioninterface#
interface MultilevelListDefinition| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
levels | ListLevelFormat[] | — |
Defined in packages/document/src/editor/editing/types.ts:167
NoteSettingsinterface#
interface NoteSettings| Property | Type | Description |
|---|---|---|
positionoptional | string | — |
formatoptional | PageNumberFormat | — |
startoptional | number | — |
restartoptional | string | — |
Defined in packages/document/src/types.ts:182
NumberingChangeinterface#
interface NumberingChangeDefined in packages/document/src/types.ts:329
NumberingDefinitionsinterface#
interface NumberingDefinitions| Property | Type | Description |
|---|---|---|
abstracts | AbstractNumbering[] | — |
instances | NumberingInstance[] | — |
Defined in packages/document/src/model/numbering.ts:52
NumberingInstanceinterface#
interface NumberingInstance| Property | Type | Description |
|---|---|---|
id | number | — |
abstractId | number | — |
overridesoptional | NumberingOverride[] | — |
Defined in packages/document/src/model/numbering.ts:46
NumberingLabelinterface#
interface NumberingLabel| Property | Type | Description |
|---|---|---|
path | number[] | — |
label | string | — |
level | number | — |
numId | number | null | — |
format | string | — |
suffix | 'tab' | 'space' | 'nothing' | — |
text | string | — |
Defined in packages/document/src/model/numbering.ts:57
NumberingLevelinterface#
interface NumberingLevel| Property | Type | Description |
|---|---|---|
level | number | — |
start | number | — |
format | string | — |
text | string | — |
suffixoptional | 'tab' | 'space' | 'nothing' | — |
restartoptional | number | — |
paragraphStyleoptional | string | — |
isLegaloptional | boolean | — |
alignoptional | string | — |
indentLeftoptional | number | — |
hangingoptional | number | — |
fontoptional | string | — |
runoptional | NumberingRun | — |
Defined in packages/document/src/model/numbering.ts:15
NumberingOverrideinterface#
interface NumberingOverride| Property | Type | Description |
|---|---|---|
level | number | — |
startoptional | number | — |
definitionoptional | NumberingLevel | — |
Defined in packages/document/src/model/numbering.ts:40
ObjectsApiinterface#
interface ObjectsApi| Member | Type | Description |
|---|---|---|
getFootnotes() | (kind?: NoteKind) => FootnoteInfo[] | — |
getBookmarks() | (includeHidden?: boolean) => BookmarkInfo[] | — |
goToBookmark() | (name: string) => boolean | — |
updateFields() | () => number | — |
setFormMode() | (enabled: boolean) => void | — |
isFormMode() | () => boolean | — |
getFormData() | () => Record<string, unknown> | — |
setFormData() | (data: Record<string, unknown>) => number | — |
validateForm() | () => FormFieldError[] | — |
openObjectDialog() | (name: ObjectDialogName) => boolean | — |
evaluateTableFormula() | (formula: string) => string | null | — |
getProtection() | () => DocumentProtection | null | — |
protectDocument() | (mode: ProtectionMode, password?: string) => Promise<boolean> | — |
unprotectDocument() | (password?: string) => Promise<boolean> | — |
isPasswordProtected() | () => boolean | — |
insertEmbeddedObject() | (options: InsertEmbeddedObjectOptions) => boolean | — |
getEmbeddedObjects() | () => EmbeddedObjectInfo[] | — |
openEmbeddedObject() | (pos?: number) => boolean | — |
downloadEmbeddedObject() | (pos?: number) => boolean | — |
Defined in packages/document/src/editor/objects/types.ts:264
ObjectsEventsinterface#
interface ObjectsEvents| Property | Type | Description |
|---|---|---|
formChange | { tag: string; value: unknown; data: Record<string, unknown> } | — |
fieldsUpdate | { count: number } | — |
embeddedObjectOpen | EmbeddedObjectOpenEvent | — |
Defined in packages/document/src/editor/objects/types.ts:258
ObjectsOptionsinterface#
interface ObjectsOptions| Property | Type | Description |
|---|---|---|
formModeoptional | boolean | — |
showBookmarksoptional | boolean | — |
noteNumberFormatoptional | Partial<Record<NoteKind, NoteNumberFormat>> | — |
mergeRecordsoptional | readonly Record<string, unknown>[] | — |
Defined in packages/document/src/editor/objects/types.ts:228
OutlineEntryinterface#
interface OutlineEntryDefined in packages/document/src/types.ts:612
PageInfointerface#
interface PageInfo| Property | Type | Description |
|---|---|---|
index | number | — |
number | number | — |
label | string | — |
section | number | — |
width | number | — |
height | number | — |
top | number | — |
orientation | 'portrait' | 'landscape' | — |
columns | number | — |
blank | boolean | — |
footnotes | number | — |
Defined in packages/document/src/layout/types.ts:43
PageMarginsinterface#
interface PageMarginsDefined in packages/document/src/types.ts:45
PageNumberinginterface#
interface PageNumbering| Property | Type | Description |
|---|---|---|
formatoptional | PageNumberFormat | — |
startoptional | number | null | — |
Defined in packages/document/src/types.ts:83
PageSetupinterface#
interface PageSetup| Property | Type | Description |
|---|---|---|
size | PageSizeName | { width: number; height: number } | — |
orientation | PageOrientation | — |
margins | PageMargins | — |
headerDistance | number | — |
footerDistance | number | — |
differentFirstPage | boolean | — |
gutteroptional | number | — |
columnsoptional | SectionColumns | null | — |
sectionTypeoptional | SectionBreakType | null | — |
pageNumbersoptional | PageNumbering | null | — |
verticalAlignoptional | 'top' | 'center' | 'bottom' | 'justify' | null | — |
rtloptional | boolean | — |
lineNumbersoptional | LineNumbering | null | — |
pageBordersoptional | PageBorders | null | — |
docxoptional | PreservedXml | null | — |
changeoptional | SectionFormatChange | null | — |
Defined in packages/document/src/types.ts:52
PageSliceinterface#
interface PageSlice| Property | Type | Description |
|---|---|---|
index | number | — |
startBlock | number | — |
startPart | number | — |
used | number | — |
section | number | — |
number | number | — |
blank | boolean | — |
clean | boolean | — |
flowY | number | — |
noteHeight | number | — |
notes | PageNote[] | — |
columns | number | — |
Defined in packages/document/src/layout/paginate-cursor.ts:102
PaginateOptionsinterface#
interface PaginateOptions| Property | Type | Description |
|---|---|---|
pageHeight | number | — |
widowControloptional | boolean | — |
minLinesoptional | number | — |
sectionsoptional | readonly LayoutSection[] | — |
noteSeparatoroptional | number | — |
balanceLastPageoptional | boolean | — |
resolvePartsoptional | (index: number, block: LayoutBlock) => readonly number[] | ResolvedParts | undefined | — |
resolveRowoptional | (index: number, row: number, block: LayoutBlock) => LayoutRow | undefined | — |
Defined in packages/document/src/layout/paginate-cursor.ts:58
PaginationResultinterface#
interface PaginationResult| Property | Type | Description |
|---|---|---|
pages | PageSlice[] | — |
breaks | LayoutBreak[] | — |
pageCount | number | — |
blockPages | number[] | — |
reuseoptional | PaginationReuse | — |
Defined in packages/document/src/layout/paginate-cursor.ts:122
ParagraphBorderinterface#
interface ParagraphBorder| Property | Type | Description |
|---|---|---|
style | BorderLineStyle | — |
width | number | — |
color | string | — |
shadowoptional | boolean | — |
Defined in packages/document/src/editor/editing/types.ts:67
ParagraphBordersinterface#
interface ParagraphBorders| Property | Type | Description |
|---|---|---|
topoptional | ParagraphBorder | null | — |
rightoptional | ParagraphBorder | null | — |
bottomoptional | ParagraphBorder | null | — |
leftoptional | ParagraphBorder | null | — |
Defined in packages/document/src/editor/editing/types.ts:74
ParagraphFormatinterface#
interface ParagraphFormat| Property | Type | Description |
|---|---|---|
alignoptional | 'left' | 'center' | 'right' | 'justify' | null | — |
indentLeftoptional | number | — |
indentRightoptional | number | — |
indentFirstLineoptional | number | — |
spaceBeforeoptional | number | null | — |
spaceAfteroptional | number | null | — |
lineRuleoptional | LineRule | — |
lineHeightoptional | number | null | — |
lineHeightPtoptional | number | null | — |
keepWithNextoptional | boolean | — |
keepLinesoptional | boolean | — |
widowControloptional | boolean | null | — |
pageBreakBeforeoptional | boolean | — |
contextualSpacingoptional | boolean | — |
outlineLeveloptional | number | null | — |
Defined in packages/document/src/editor/editing/types.ts:81
ParagraphFormatChangeinterface#
interface ParagraphFormatChange| Property | Type | Description |
|---|---|---|
id | string | — |
author | string | — |
date | string | — |
before | { attrs: Record<string, unknown>; pPr?: string | null } | — |
Defined in packages/document/src/types.ts:308
ParagraphStyleDefinitioninterface#
interface ParagraphStyleDefinition| Property | Type | Description |
|---|---|---|
id | ParagraphStyleId | — |
wordName | string | — |
label | string | — |
tag | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'blockquote' | 'pre' | — |
fontSizeoptional | number | — |
fontFamilyoptional | string | — |
boldoptional | boolean | — |
italicoptional | boolean | — |
coloroptional | string | — |
spaceBeforeoptional | number | — |
spaceAfteroptional | number | — |
lineHeightoptional | number | — |
alignoptional | TextAlignment | — |
indentLeftoptional | number | — |
indentRightoptional | number | — |
outlineLeveloptional | number | — |
keepWithNextoptional | boolean | — |
shadingoptional | string | — |
Defined in packages/document/src/model/paragraph-styles.ts:3
ParagraphStyleInfointerface#
interface ParagraphStyleInfo| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
basedOn | string | — |
isBuiltin | boolean | — |
isModified | boolean | — |
isActive | boolean | — |
format | StyleFormat | — |
Defined in packages/document/src/editor/editing/types.ts:142
ParsedFieldinterface#
interface ParsedField| Property | Type | Description |
|---|---|---|
keyword | string | — |
kind | FieldKind | 'link' | — |
name | string | — |
args | string[] | — |
switches | Record<string, string | true> | — |
href | string | null | — |
title | string | null | — |
canonical | string | — |
placeholder | string | null | — |
Defined in packages/document/src/model/fields.ts:25
PastedImageContextinterface#
interface PastedImageContext| Property | Type | Description |
|---|---|---|
source | 'word' | 'googleDocs' | 'editor' | 'other' | — |
index | number | — |
alt | string | — |
html | string | — |
rtf | string | — |
files | readonly File[] | — |
Defined in packages/document/src/editor/editing/types.ts:194
PdfClusterinterface#
interface PdfClusterDefined in packages/document/src/layout/pdf/layout-tree.ts:47
PdfColorinterface#
interface PdfColorDefined in packages/document/src/layout/pdf/layout-tree.ts:1
PdfDestinationinterface#
interface PdfDestinationDefined in packages/document/src/layout/pdf/layout-tree.ts:144
PdfDocumentLayoutinterface#
interface PdfDocumentLayout| Property | Type | Description |
|---|---|---|
pages | PdfPage[] | — |
outlineoptional | PdfOutlineEntry[] | — |
titleoptional | string | — |
authoroptional | string | — |
subjectoptional | string | — |
keywordsoptional | string | — |
languageoptional | string | — |
fontsoptional | readonly PdfFontSource[] | — |
structureoptional | readonly PdfStructNode[] | — |
pdfAoptional | boolean | — |
createdoptional | Date | — |
modifiedoptional | Date | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:182
PdfExportOptionsinterface#
interface PdfExportOptions| Property | Type | Description |
|---|---|---|
titleoptional | string | — |
authoroptional | string | — |
subjectoptional | string | — |
keywordsoptional | string | — |
fontsoptional | readonly PdfFontSource[] | — |
compressoptional | boolean | — |
outlineoptional | boolean | — |
onProgressoptional | (page: number, pages: number) => void | — |
fontLoaderoptional | PdfFontLoader | — |
localFontsoptional | boolean | — |
taggedoptional | boolean | — |
pdfAoptional | boolean | — |
Defined in packages/document/src/layout/types.ts:6
PdfFontSourceinterface#
interface PdfFontSourceDefined in packages/document/src/layout/pdf/layout-tree.ts:175
PdfGroupinterface#
interface PdfGroup extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'group' | — |
items | PdfItem[] | — |
matrixoptional | PdfMatrix | — |
clipoptional | { x: number; y: number; width: number; height: number } | — |
opacityoptional | number | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:152
PdfImageinterface#
interface PdfImage extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'image' | — |
x | number | — |
y | number | — |
width | number | — |
height | number | — |
data | Uint8Array | — |
mime | 'image/jpeg' | 'image/png' | — |
altoptional | string | — |
rotationoptional | number | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:121
PdfLineinterface#
interface PdfLine extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'line' | — |
x1 | number | — |
y1 | number | — |
x2 | number | — |
y2 | number | — |
coloroptional | PdfColor | — |
widthoptional | number | — |
dashoptional | readonly number[] | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:93
PdfLinkAreainterface#
interface PdfLinkArea| Property | Type | Description |
|---|---|---|
kind | 'link' | — |
x | number | — |
y | number | — |
width | number | — |
height | number | — |
hrefoptional | string | — |
destinationoptional | string | — |
structoptional | number | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:133
PdfOutlineEntryinterface#
interface PdfOutlineEntryDefined in packages/document/src/layout/pdf/layout-tree.ts:168
PdfPageinterface#
interface PdfPageDefined in packages/document/src/layout/pdf/layout-tree.ts:162
PdfPathinterface#
interface PdfPath extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'path' | — |
commands | readonly PdfPathCommand[] | — |
filloptional | PdfColor | — |
strokeoptional | PdfColor | — |
strokeWidthoptional | number | — |
dashoptional | readonly number[] | — |
roundCapsoptional | boolean | — |
roundJoinsoptional | boolean | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:110
PdfRectinterface#
interface PdfRect extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'rect' | — |
x | number | — |
y | number | — |
width | number | — |
height | number | — |
filloptional | PdfColor | — |
strokeoptional | PdfColor | — |
strokeWidthoptional | number | — |
dashoptional | readonly number[] | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:81
PdfStructNodeinterface#
interface PdfStructNode| Property | Type | Description |
|---|---|---|
type | PdfStructType | — |
parent | number | — |
altoptional | string | — |
languageoptional | string | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:35
PdfTagginginterface#
interface PdfTagging| Property | Type | Description |
|---|---|---|
structoptional | number | — |
artifactoptional | PdfArtifactType | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:42
PdfTextRuninterface#
interface PdfTextRun extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'text' | — |
x | number | — |
baseline | number | — |
width | number | — |
text | string | — |
fontFamily | string | — |
fontSize | number | — |
boldoptional | boolean | — |
italicoptional | boolean | — |
coloroptional | PdfColor | — |
underlineoptional | boolean | — |
underlineStyleoptional | PdfUnderlineStyle | The line drawn for underline; a single line when left out. |
underlineColoroptional | PdfColor | The colour of the underline; the colour of the text when left out. |
strikeoptional | boolean | — |
doubleStrikeoptional | boolean | — |
backgroundoptional | PdfColor | — |
linkoptional | string | — |
directionoptional | 'ltr' | 'rtl' | — |
clustersoptional | readonly PdfCluster[] | — |
trailingSpaceoptional | boolean | — |
decorationoptional | { x: number; width: number } | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:55
PdfWriteOptionsinterface#
interface PdfWriteOptions| Property | Type | Description |
|---|---|---|
compressoptional | boolean | — |
creationDateoptional | Date | — |
produceroptional | string | — |
pdfAoptional | boolean | — |
taggedoptional | boolean | — |
Defined in packages/document/src/layout/pdf/writer.ts:29
PdfWriteResultinterface#
interface PdfWriteResultDefined in packages/document/src/layout/pdf/writer.ts:37
Personinterface#
interface PersonDefined in packages/document/src/editor/review/types.ts:56
PresenceStateinterface#
interface PresenceState| Property | Type | Description |
|---|---|---|
clientId | CollabClientId | — |
name | string | — |
coloroptional | string | — |
anchor | number | null | — |
head | number | null | — |
focused | boolean | — |
clockoptional | number | — |
Defined in packages/document/src/editor/collab/types.ts:71
PreservedPartinterface#
interface PreservedPart| Property | Type | Description |
|---|---|---|
textoptional | string | — |
base64optional | string | — |
deflateoptional | string | A large text part, kept as the base64 of its raw DEFLATE data exactly as it was stored in the source file. |
sizeoptional | number | The length in bytes of the part once deflate is inflated. |
Defined in packages/document/src/types.ts:231
PreservedRelationshipinterface#
interface PreservedRelationshipDefined in packages/document/src/types.ts:88
PreservedXmlinterface#
interface PreservedXml
[key: string]: unknown| Property | Type | Description |
|---|---|---|
xml | string | — |
sigoptional | string | — |
relsoptional | PreservedRelationship[] | — |
Defined in packages/document/src/types.ts:95
ProposedChangeinterface#
interface ProposedChange| Property | Type | Description |
|---|---|---|
fromoptional | number | — |
tooptional | number | — |
findoptional | string | — |
occurrenceoptional | number | — |
text | string | — |
authoroptional | string | — |
dateoptional | string | — |
Defined in packages/document/src/types.ts:897
ReadAloudApiinterface#
interface ReadAloudApi| Member | Type | Description |
|---|---|---|
readAloud() | (options?: ReadAloudOptions) => ReadAloudHandle | — |
stopReadAloud() | () => void | — |
isReadingAloud() | () => boolean | — |
Defined in packages/document/src/editor/read-aloud.ts:35
ReadAloudChunkinterface#
interface ReadAloudChunk| Property | Type | Description |
|---|---|---|
pageIndex | number | The page the sentence starts on, from 0. |
text | string | — |
from | number | Where the sentence starts and ends in the document. |
to | number | — |
Defined in packages/document/src/editor/read-aloud.ts:8
ReadAloudEventsinterface#
interface ReadAloudEvents| Property | Type | Description |
|---|---|---|
readAloudChange | { reading: boolean; paused: boolean } | — |
Defined in packages/document/src/editor/read-aloud.ts:43
ReadAloudHandleinterface#
interface ReadAloudHandle| Property | Type | Description |
|---|---|---|
isPausedreadonly | boolean | — |
isStoppedreadonly | boolean | — |
finishedreadonly | Promise<void> | — |
pause() | () => void | — |
resume() | () => void | — |
stop() | () => void | — |
Defined in packages/document/src/editor/read-aloud.ts:26
ReadAloudOptionsinterface#
interface ReadAloudOptions| Property | Type | Description |
|---|---|---|
fromPageoptional | number | The page to start on, from 0. Without it reading starts at the cursor. |
onTextoptional | (chunk: ReadAloudChunk) => void | Promise<void> | Speaks one sentence yourself; the next one follows when the promise settles. Without it the browser speaks. |
langoptional | string | — |
rateoptional | number | — |
Defined in packages/document/src/editor/read-aloud.ts:17
ReviewApiinterface#
interface ReviewApi| Member | Type | Description |
|---|---|---|
getMarkupMode() | () => MarkupMode | — |
setMarkupMode() | (mode: MarkupMode) => void | — |
getMarkupVisibility() | () => MarkupVisibility | — |
setMarkupVisibility() | (visibility: Partial<MarkupVisibility>) => void | — |
getRevisions() | (filter?: RevisionFilter) => RevisionChange[] | — |
acceptChanges() | (filter?: RevisionFilter) => number | — |
rejectChanges() | (filter?: RevisionFilter) => number | — |
nextChange() | () => RevisionChange | null | — |
previousChange() | () => RevisionChange | null | — |
goToChange() | (id: string) => boolean | — |
editReply() | (threadId: string, replyId: string, text: string) => boolean | — |
deleteReply() | (threadId: string, replyId: string) => boolean | — |
saveSnapshot() | (label?: string) => SnapshotInfo | null | — |
getSnapshots() | () => SnapshotInfo[] | — |
restoreSnapshot() | (id: string) => boolean | — |
compareWithSnapshot() | (id: string, options?: CompareOptions) => number | — |
deleteSnapshot() | (id: string) => boolean | — |
getSnapshotDocument() | (id: string) => DocumentData | null | — |
compareWithDocx() | (input: ArrayBuffer | Uint8Array | Blob, options?: CompareOptions) => Promise<number> | — |
compareSideBySide() | (revised: DocumentInput, options?: SideBySideOptions) => boolean | — |
closeSideBySide() | () => boolean | — |
isSideBySideOpen() | () => boolean | — |
combineWith() | (first: DocumentInput, second: DocumentInput, options?: CombineOptions) => number | — |
combineWithDocx() | (first: ArrayBuffer | Uint8Array | Blob, second: ArrayBuffer | Uint8Array | Blob, options?: CombineOptions) => Promise<number> | — |
Defined in packages/document/src/editor/review/types.ts:126
ReviewEventsinterface#
interface ReviewEvents| Property | Type | Description |
|---|---|---|
revisionsChange | { revisions: RevisionChange[] } | — |
markupModeChange | { mode: MarkupMode } | — |
snapshotsChange | { snapshots: SnapshotInfo[] } | — |
Defined in packages/document/src/editor/review/types.ts:120
ReviewOptionsinterface#
interface ReviewOptions| Property | Type | Description |
|---|---|---|
markupModeoptional | MarkupMode | — |
changeBarsoptional | boolean | — |
changeBalloonsoptional | boolean | — |
commentsLayoutoptional | 'margin' | 'panel' | — |
mentionsoptional | MentionOptions | — |
snapshotsoptional | SnapshotStorage | — |
Defined in packages/document/src/editor/review/types.ts:111
RevisionChangeinterface#
interface RevisionChange| Property | Type | Description |
|---|---|---|
id | string | — |
ids | string[] | — |
kind | RevisionChangeKind | — |
author | string | — |
date | string | — |
text | string | — |
deletedTextoptional | string | — |
summary | string | — |
from | number | — |
to | number | — |
Defined in packages/document/src/editor/review/types.ts:19
RevisionFilterinterface#
interface RevisionFilter| Property | Type | Description |
|---|---|---|
idsoptional | readonly string[] | — |
authoroptional | string | — |
authorsoptional | readonly string[] | — |
kindsoptional | readonly RevisionChangeKind[] | — |
fromoptional | number | — |
tooptional | number | — |
afteroptional | string | Date | — |
beforeoptional | string | Date | — |
Defined in packages/document/src/editor/review/types.ts:32
RevisionInfointerface#
interface RevisionInfo| Property | Type | Description |
|---|---|---|
kind | 'insertion' | 'deletion' | — |
id | string | — |
author | string | — |
date | string | — |
moveIdoptional | string | null | — |
Defined in packages/document/src/types.ts:296
RibbonApiinterface#
interface RibbonApi| Member | Type | Description |
|---|---|---|
getRibbonTab() | () => string | null | — |
setRibbonTab() | (tab: RibbonTabName) => boolean | — |
isRibbonCollapsed() | () => boolean | — |
setRibbonCollapsed() | (collapsed: boolean) => void | — |
getViewMode() | () => DocumentViewMode | — |
setViewMode() | (mode: DocumentViewMode) => void | — |
fitZoom() | (mode: 'width' | 'page') => number | — |
getTabStops() | () => TabStop[] | — |
setTabStops() | (stops: readonly TabStop[]) => boolean | — |
Defined in packages/document/src/editor/ribbon/types.ts:85
RibbonConfiginterface#
interface RibbonConfig| Property | Type | Description |
|---|---|---|
tabsoptional | readonly RibbonTabName[] | — |
groupOrderoptional | Readonly<Record<string, readonly string[]>> | — |
tabLabelsoptional | Readonly<Record<string, string>> | — |
customoptional | readonly RibbonCustomGroup[] | — |
activeTaboptional | RibbonTabName | — |
collapsedoptional | boolean | — |
keyTipsoptional | boolean | — |
Defined in packages/document/src/editor/ribbon/types.ts:56
RibbonCustomControlinterface#
interface RibbonCustomControl| Property | Type | Description |
|---|---|---|
id | string | — |
label | string | — |
iconoptional | string | — |
kindoptional | 'button' | 'toggle' | — |
sizeoptional | 'large' | 'small' | — |
keyTipoptional | string | — |
shortcutoptional | string | — |
readOnlySafeoptional | boolean | — |
run | (api: DocumentEditorApi) => void | — |
isPressedoptional | (api: DocumentEditorApi) => boolean | — |
isDisabledoptional | (api: DocumentEditorApi) => boolean | — |
Defined in packages/document/src/editor/ribbon/types.ts:33
RibbonCustomGroupinterface#
interface RibbonCustomGroup| Property | Type | Description |
|---|---|---|
tab | RibbonTabName | — |
tabLabeloptional | string | — |
group | string | — |
label | string | — |
orderoptional | number | — |
controls | readonly RibbonCustomControl[] | — |
Defined in packages/document/src/editor/ribbon/types.ts:47
RibbonEventsinterface#
interface RibbonEvents| Property | Type | Description |
|---|---|---|
ribbonTabChange | { tab: string } | — |
viewModeChange | { mode: DocumentViewMode } | — |
Defined in packages/document/src/editor/ribbon/types.ts:80
RibbonOptionsinterface#
interface RibbonOptions| Property | Type | Description |
|---|---|---|
ribbonoptional | boolean | RibbonConfig | — |
miniToolbaroptional | boolean | — |
viewModeoptional | DocumentViewMode | — |
themeoptional | 'auto' | 'light' | 'dark' | — |
darkPageoptional | 'white' | 'dark' | — |
verticalRuleroptional | boolean | — |
commandSearchoptional | boolean | The Search commands box of the tab row and its Alt+Q shortcut. On by default. |
Defined in packages/document/src/editor/ribbon/types.ts:69
RunFormatChangeinterface#
interface RunFormatChange| Property | Type | Description |
|---|---|---|
id | string | — |
author | string | — |
date | string | — |
before | { marks: DocMarkJSON[]; rPr?: string | null } | — |
Defined in packages/document/src/types.ts:336
SearchBlockinterface#
interface SearchBlockDefined in packages/document/src/model/search.ts:3
SearchMatchinterface#
interface SearchMatchDefined in packages/document/src/model/search.ts:8
SectionColumnsinterface#
interface SectionColumns| Property | Type | Description |
|---|---|---|
count | number | — |
gap | number | — |
separatoroptional | boolean | — |
widthsoptional | { width: number; gap: number }[] | — |
Defined in packages/document/src/types.ts:73
SectionFormatChangeinterface#
interface SectionFormatChange| Property | Type | Description |
|---|---|---|
id | string | — |
author | string | — |
date | string | — |
before | { page: PageSetup; sectPr?: string | null } | — |
Defined in packages/document/src/types.ts:322
SectionHeadersinterface#
interface SectionHeaders| Property | Type | Description |
|---|---|---|
headeroptional | DocNodeJSON | null | — |
footeroptional | DocNodeJSON | null | — |
firstHeaderoptional | DocNodeJSON | null | — |
firstFooteroptional | DocNodeJSON | null | — |
evenHeaderoptional | DocNodeJSON | null | — |
evenFooteroptional | DocNodeJSON | null | — |
Defined in packages/document/src/types.ts:102
SideBySideOptionsinterface#
interface SideBySideOptions extends CompareOptions| Property | Type | Description |
|---|---|---|
originaloptional | DocumentInput | — |
originalLabeloptional | string | — |
revisedLabeloptional | string | — |
authoroptional | string | undefined | Inherited from CompareOptions. |
dateoptional | string | undefined | Inherited from CompareOptions. |
granularityoptional | "word" | "character" | undefined | Inherited from CompareOptions. |
movesoptional | boolean | undefined | Inherited from CompareOptions. |
formattingoptional | boolean | undefined | Inherited from CompareOptions. |
Defined in packages/document/src/editor/review/types.ts:43
SnapshotInfointerface#
interface SnapshotInfoDefined in packages/document/src/editor/review/types.ts:81
SnapshotStorageinterface#
interface SnapshotStorage| Property | Type | Description |
|---|---|---|
load() | () => Promise<DocumentSnapshot[]> | DocumentSnapshot[] | — |
save() | (snapshots: DocumentSnapshot[]) => Promise<void> | void | — |
Defined in packages/document/src/editor/review/types.ts:88
SortTableValueinterface#
interface SortTableValue| Property | Type | Description |
|---|---|---|
column | number | — |
typeoptional | 'text' | 'number' | 'date' | — |
descendingoptional | boolean | — |
hasHeaderoptional | boolean | — |
Defined in packages/document/src/editor/objects/types.ts:116
SourcePersoninterface#
interface SourcePersonDefined in packages/document/src/types.ts:475
SpellingApiinterface#
interface SpellingApi| Member | Type | Description |
|---|---|---|
getSpellingIssues() | () => SpellingMatch[] | — |
checkSpelling() | () => Promise<void> | — |
ignoreSpelling() | (word: string) => void | — |
replaceSpelling() | (from: number, text: string) => boolean | — |
Defined in packages/document/src/types.ts:932
SpellingIssueinterface#
interface SpellingIssue| Property | Type | Description |
|---|---|---|
from | number | — |
to | number | — |
messageoptional | string | — |
suggestionsoptional | readonly string[] | — |
Defined in packages/document/src/types.ts:912
SpellingMatchinterface#
interface SpellingMatch| Property | Type | Description |
|---|---|---|
from | number | — |
to | number | — |
text | string | — |
messageoptional | string | — |
suggestions | string[] | — |
Defined in packages/document/src/types.ts:924
StyleFormatinterface#
interface StyleFormat| Property | Type | Description |
|---|---|---|
fontFamilyoptional | string | — |
fontSizeoptional | number | — |
boldoptional | boolean | — |
italicoptional | boolean | — |
underlineoptional | boolean | — |
coloroptional | string | — |
alignoptional | 'left' | 'center' | 'right' | 'justify' | — |
lineHeightoptional | number | — |
spaceBeforeoptional | number | — |
spaceAfteroptional | number | — |
indentLeftoptional | number | — |
indentFirstLineoptional | number | — |
Defined in packages/document/src/editor/editing/types.ts:127
TableFormatChangeinterface#
interface TableFormatChange| Property | Type | Description |
|---|---|---|
id | string | — |
author | string | — |
date | string | — |
before | { attrs: Record<string, unknown>; tblPr?: string | null } | — |
Defined in packages/document/src/types.ts:315
TableLookinterface#
interface TableLook| Property | Type | Description |
|---|---|---|
firstRowoptional | boolean | — |
lastRowoptional | boolean | — |
firstColumnoptional | boolean | — |
lastColumnoptional | boolean | — |
bandedRowsoptional | boolean | — |
bandedColumnsoptional | boolean | — |
Defined in packages/document/src/editor/objects/types.ts:128
TableOfContentsOptionsinterface#
interface TableOfContentsOptions| Property | Type | Description |
|---|---|---|
maxLeveloptional | number | — |
showPagesoptional | boolean | — |
hyperlinksoptional | boolean | — |
leaderoptional | 'dot' | 'hyphen' | 'underscore' | 'none' | — |
Defined in packages/document/src/editor/objects/types.ts:199
TablePropertiesValueinterface#
interface TablePropertiesValue| Property | Type | Description |
|---|---|---|
alignoptional | 'left' | 'center' | 'right' | null | — |
indentoptional | number | null | — |
widthoptional | number | string | null | — |
cellMarginsoptional | { top: number; right: number; bottom: number; left: number } | null | — |
repeatHeaderoptional | boolean | — |
cantSplitoptional | boolean | — |
captionoptional | string | — |
descriptionoptional | string | — |
Defined in packages/document/src/editor/objects/types.ts:137
TabStopinterface#
interface TabStop| Property | Type | Description |
|---|---|---|
position | number | — |
align | 'left' | 'center' | 'right' | 'decimal' | 'bar' | 'clear' | — |
leaderoptional | 'none' | 'dot' | 'hyphen' | 'underscore' | 'middleDot' | 'heavy' | — |
Defined in packages/document/src/types.ts:343
TemplateInfointerface#
interface TemplateInfo| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
description | string | — |
isBuiltin | boolean | — |
Defined in packages/document/src/editor/file/types.ts:44
TextToTableValueinterface#
interface TextToTableValue| Property | Type | Description |
|---|---|---|
separatoroptional | 'tab' | 'comma' | 'paragraph' | string | — |
columnsoptional | number | — |
Defined in packages/document/src/editor/objects/types.ts:123
TrackedChangeinterface#
interface TrackedChange| Property | Type | Description |
|---|---|---|
id | string | — |
kind | TrackedChangeKind | — |
author | string | — |
date | string | — |
text | string | — |
from | number | — |
to | number | — |
Defined in packages/document/src/types.ts:595
UnzipOptionsinterface#
interface UnzipOptionsDefined in packages/document/src/docx/errors.ts:10
Watermarkinterface#
interface Watermark| Property | Type | Description |
|---|---|---|
text | string | The text of a text watermark; empty for a picture watermark. |
imageoptional | string | A picture watermark: a data:image/… URL. It takes the place of the text. |
scaleoptional | number | Size of the picture as a multiple of its own size; without it the picture fits the text area. |
washoutoptional | boolean | false draws the picture at full strength instead of washed out. |
rotationoptional | number | — |
opacityoptional | number | — |
coloroptional | string | — |
fontFamilyoptional | string | — |
fontSizeoptional | number | — |
Defined in packages/document/src/editor/editing/types.ts:229
WordCountinterface#
interface WordCount| Property | Type | Description |
|---|---|---|
words | number | — |
characters | number | — |
charactersNoSpaces | number | — |
paragraphs | number | — |
Defined in packages/document/src/types.ts:605
ZipLimitsinterface#
interface ZipLimits| Property | Type | Description |
|---|---|---|
maxEntries | number | — |
maxEntryBytes | number | — |
maxTotalBytes | number | — |
maxRatio | number | — |
Defined in packages/document/src/docx/errors.ts:1
AccessibilityCommandtype#
type AccessibilityCommand = 'accessibilityPane';Defined in packages/document/src/editor/accessibility/index.ts:19
AccessibilityRuletype#
type AccessibilityRule = 'missingAltText' | 'skippedHeading' | 'tableHeader' | 'lowContrast';Defined in packages/document/src/model/accessibility.ts:4
BorderEdgetype#
type BorderEdge = 'all' | 'outer' | 'inner' | 'none' | 'top' | 'bottom' | 'left' | 'right';Defined in packages/document/src/editor/objects/types.ts:105
BorderLineStyletype#
type BorderLineStyle = 'none' | 'single' | 'double' | 'dashed' | 'dotted';Defined in packages/document/src/editor/editing/types.ts:65
BorderSettype#
type BorderSet = Partial<Record<'top' | 'right' | 'bottom' | 'left' | 'between' | 'bar', BorderLine>>;Defined in packages/document/src/types.ts:365
BreakKindtype#
type BreakKind = 'page' | 'column' | 'sectionNextPage' | 'sectionContinuous';Defined in packages/document/src/editor/editing/types.ts:227
BulletListStyletype#
type BulletListStyle = 'disc' | 'circle' | 'square';Defined in packages/document/src/types.ts:561
CaseModetype#
type CaseMode = 'sentence' | 'lower' | 'upper' | 'capitalize' | 'toggle';Defined in packages/document/src/editor/editing/types.ts:61
ChartTypetype#
type ChartType = 'column' | 'bar' | 'line' | 'area' | 'pie' | 'doughnut' | 'scatter';Defined in packages/document/src/types.ts:452
CitationsCommandtype#
type CitationsCommand = 'insertCitation' | 'insertBibliography' | 'citationStyle' | 'manageSources';Defined in packages/document/src/editor/citations/types.ts:25
CitationStyletype#
type CitationStyle = 'apa' | 'mla' | 'chicago';Defined in packages/document/src/types.ts:473
CollabBackendEventtype#
type CollabBackendEvent =
| { type: 'connection'; status: CollabConnectionStatus }
| { type: 'steps'; payload: CollabRemotePayload }
| { type: 'reset'; snapshot: CollabSnapshot }
| { type: 'presence'; states: Record<string, PresenceState> }
| { type: 'locks'; state: CollabLockState }
| { type: 'snapshotRequest' };Defined in packages/document/src/editor/collab/types.ts:189
CollabClientIdtype#
type CollabClientId = string | number;Defined in packages/document/src/editor/collab/types.ts:14
CollabCommandtype#
type CollabCommand = never;Defined in packages/document/src/editor/collab/types.ts:12
CollabCommentOperationtype#
type CollabCommentOperation =
| { type: 'add'; thread: CommentThread }
| { type: 'reply'; id: string; reply: CommentReply }
| { type: 'edit'; id: string; text: string }
| { type: 'resolve'; id: string; resolved: boolean }
| { type: 'delete'; id: string }
| { type: 'editReply'; id: string; replyId: string; text: string }
| { type: 'deleteReply'; id: string; replyId: string };Defined in packages/document/src/editor/collab/types.ts:16
CollabConnectionStatustype#
type CollabConnectionStatus = 'connected' | 'reconnecting' | 'offline';Defined in packages/document/src/editor/collab/types.ts:30
CollabDocumentPreparedtype#
type CollabDocumentPrepared =
{ ok: true; footprint: CollabStepFootprint[]; commit(): void } | { ok: false; reason: string };The authority's own copy of the document. Steps are applied to it, and a step that does not apply is refused.
Defined in packages/document/src/editor/collab/types.ts:232
CollabDocumentResulttype#
type CollabDocumentResult = { ok: true; footprint: CollabStepFootprint[] } | { ok: false; reason: string };Defined in packages/document/src/editor/collab/types.ts:229
CollabMetaOperationtype#
type CollabMetaOperation =
| { type: 'pageSetup'; page: PageSetup }
| { type: 'headerFooter'; parts: HeaderFooterContent }
| { type: 'comment'; operation: CollabCommentOperation };Defined in packages/document/src/editor/collab/types.ts:25
CollabRejectReasontype#
type CollabRejectReason = 'stale' | 'locked' | 'offline' | 'invalid';Defined in packages/document/src/editor/collab/types.ts:56
CollabSendResulttype#
type CollabSendResult = void | boolean | CollabSubmitResult;Defined in packages/document/src/editor/collab/types.ts:187
CollabStatetype#
type CollabState = 'disabled' | 'synced' | 'pending' | 'offline' | 'desynced';Defined in packages/document/src/editor/collab/types.ts:352
CollabStoredVersiontype#
type CollabStoredVersion = CollabVersionSnapshot | CollabVersionDelta;Defined in packages/document/src/editor/collab/types.ts:139
CollabWireMessagetype#
type CollabWireMessage = { type: string } & Record<string, unknown>;Defined in packages/document/src/editor/collab/types.ts:298
ContentControlKindtype#
type ContentControlKind =
| 'richText'
| 'plainText'
| 'dropdown'
| 'comboBox'
| 'date'
| 'checkbox'
| 'picture'
| 'repeatingSection'
| 'repeatingSectionItem'
| 'group'
| 'buildingBlock'
| 'citation'
| 'bibliography'
| 'unknown';Defined in packages/document/src/types.ts:266
CrossReferenceDisplaytype#
type CrossReferenceDisplay = 'text' | 'page' | 'aboveBelow' | 'number';Defined in packages/document/src/editor/objects/types.ts:183
CrossReferenceTargettype#
type CrossReferenceTarget = 'heading' | 'bookmark' | 'figure' | 'table' | 'equation' | 'footnote';Defined in packages/document/src/editor/objects/types.ts:182
DocFormatCodetype#
type DocFormatCode =
'not-a-doc' | 'encrypted' | 'unsupported-version' | 'too-large' | 'too-many-characters' | 'corrupt';Defined in packages/document/src/doc/errors.ts:1
DocumentCommandtype#
type DocumentCommand =
| CoreDocumentCommand
| EditingCommand
| ObjectsCommand
| ReviewCommand
| CollabCommand
| RibbonCommand
| LayoutCommand
| FileCommand
| CitationsCommand
| AccessibilityCommand
| DrawCommand
| ReadAloudCommand
| 'spellingSuggestions';Defined in packages/document/src/types.ts:656
DocumentFormatCodetype#
type DocumentFormatCode =
'encrypted-or-legacy-doc' | 'encrypted-entry' | 'not-a-zip' | 'not-a-word-document' | 'xml-too-deep';Defined in packages/document/src/docx/errors.ts:39
DocumentInputtype#
type DocumentInput = Partial<DocumentData> | DocNodeJSON;Defined in packages/document/src/types.ts:544
DocumentLayouttype#
type DocumentLayout = 'page' | 'web';Defined in packages/document/src/types.ts:654
DocumentStyleTypetype#
type DocumentStyleType = 'paragraph' | 'character' | 'table' | 'numbering';Defined in packages/document/src/types.ts:211
DocumentViewModetype#
type DocumentViewMode = 'edit' | 'read' | 'focus';Defined in packages/document/src/editor/ribbon/types.ts:31
DrawCommandtype#
type DrawCommand = 'drawTool' | 'inkColor' | 'inkWidth' | 'insertInk' | 'eraseInk';Defined in packages/document/src/editor/draw/index.ts:41
DrawTooltype#
type DrawTool = InkTool | 'eraser';Defined in packages/document/src/editor/draw/index.ts:22
EditingCommandtype#
type EditingCommand =
| 'fontDialog'
| 'fontFormat'
| 'paragraphDialog'
| 'paragraphFormat'
| 'bordersDialog'
| 'paragraphBorders'
| 'paragraphShading'
| 'listLibrary'
| 'applyListFormat'
| 'defineMultilevelList'
| 'applyMultilevelList'
| 'applyStyle'
| 'stylesPane'
| 'revealFormatting'
| 'clearParagraphFormatting'
| 'clearCharacterFormatting'
| 'clearCharacterStyle'
| 'formatPainterLock'
| 'findPane'
| 'replacePane'
| 'navigationPane'
| 'moveSectionUp'
| 'moveSectionDown'
| 'promoteHeading'
| 'demoteHeading'
| 'changeCase'
| 'cycleCase'
| 'dropCap'
| 'symbolDialog'
| 'dateTimeDialog'
| 'insertDateTime'
| 'wordCountDialog'
| 'pasteText'
| 'pasteMode'
| 'pasteSpecialDialog'
| 'autocorrectDialog'
| 'defaultTabStop'
| 'documentPropertiesDialog'
| 'documentProperties'
| 'hyperlinkDialog'
| 'hyperlink'
| 'insertBreak'
| 'pageSetupDialog'
| 'columns'
| 'columnsDialog'
| 'noteOptionsDialog'
| 'lineNumbers'
| 'watermark'
| 'watermarkDialog'
| 'multilevelDialog'
| 'numberFormatDialog'
| 'formattingMarks'
| 'insertSpecialCharacter';Defined in packages/document/src/editor/editing/types.ts:6
FieldKindtype#
type FieldKind =
| 'merge'
| 'page'
| 'pages'
| 'date'
| 'time'
| 'ref'
| 'pageref'
| 'noteref'
| 'seq'
| 'if'
| 'toc'
| 'styleref'
| 'property'
| 'form'
| 'citation'
| 'bibliography'
| 'other';Defined in packages/document/src/model/fields.ts:6
FileCommandtype#
type FileCommand =
| 'fileMenu'
| 'newDocument'
| 'newFromTemplate'
| 'openFile'
| 'saveFile'
| 'downloadFile'
| 'printDocument';Defined in packages/document/src/editor/file/types.ts:25
FileErrorCodetype#
type FileErrorCode = 'unsupported-format' | 'too-large' | 'unreadable' | 'password-required' | 'wrong-password';Defined in packages/document/src/editor/file/types.ts:84
FileExportFormattype#
type FileExportFormat = 'docx' | 'pdf' | 'odt' | 'html' | 'markdown' | 'text';Defined in packages/document/src/editor/file/types.ts:5
FileImportFormattype#
type FileImportFormat = 'docx' | 'doc' | 'odt' | 'rtf' | 'html' | 'markdown' | 'text';Defined in packages/document/src/editor/file/types.ts:3
FileItemIdtype#
type FileItemId =
| 'new'
| 'templates'
| 'open'
| 'save'
| 'downloadDocx'
| 'downloadPdf'
| 'downloadOdt'
| 'downloadHtml'
| 'downloadMarkdown'
| 'downloadText'
| 'print'
| 'pageSetup'
| 'properties'
| 'versionHistory'
| 'password'
| 'shortcuts';Defined in packages/document/src/editor/file/types.ts:7
FileKindtype#
type FileKind =
'word' | 'excel' | 'powerpoint' | 'pdf' | 'email' | 'image' | 'text' | 'archive' | 'media' | 'file';Defined in packages/document/src/docx/file-type.ts:5
FileRequestResulttype#
type FileRequestResult = boolean | void | Promise<boolean | void>;Defined in packages/document/src/editor/file/types.ts:57
FileTypeLabeltype#
type FileTypeLabel =
| 'word'
| 'excel'
| 'powerpoint'
| 'document'
| 'spreadsheet'
| 'presentation'
| 'pdf'
| 'outlook'
| 'email'
| 'image'
| 'text'
| 'csv'
| 'archive'
| 'audio'
| 'video'
| 'file';Defined in packages/document/src/docx/file-type.ts:8
FileTypeSourcetype#
type FileTypeSource = 'progId' | 'fileName' | 'contentType' | 'content' | 'none';Defined in packages/document/src/docx/file-type.ts:26
FormControlKindtype#
type FormControlKind =
'plainText' | 'richText' | 'dropdown' | 'comboBox' | 'date' | 'checkbox' | 'picture' | 'repeatingSection';Defined in packages/document/src/editor/objects/types.ts:206
ImageRecolortype#
type ImageRecolor = 'grayscale' | 'sepia' | 'washout' | 'blackWhite';Defined in packages/document/src/types.ts:411
ImageShapePresettype#
type ImageShapePreset = 'rounded' | 'oval' | 'softEdge';Defined in packages/document/src/types.ts:412
ImageSourceKindtype#
type ImageSourceKind = 'embedded' | 'remote' | 'none';Defined in packages/document/src/model/url.ts:7
ImageWraptype#
type ImageWrap = 'inline' | 'square' | 'tight' | 'through' | 'topBottom' | 'behind' | 'inFront';Defined in packages/document/src/types.ts:367
InkTooltype#
type InkTool = 'pen' | 'highlighter';Defined in packages/document/src/types.ts:441
LayoutBlockKindtype#
type LayoutBlockKind = 'atomic' | 'lines' | 'rows' | 'pageBreak' | 'columnBreak' | 'sectionBreak';Defined in packages/document/src/layout/paginate-cursor.ts:3
LayoutCommandtype#
type LayoutCommand = never;Defined in packages/document/src/layout/types.ts:4
LayoutCompatibilitytype#
type LayoutCompatibility = 'word' | 'legacy';Defined in packages/document/src/layout/types.ts:21
LineRuletype#
type LineRule = 'auto' | 'exact' | 'atLeast';Defined in packages/document/src/editor/editing/types.ts:63
MarkupModetype#
type MarkupMode = 'all' | 'simple' | 'none' | 'original';Defined in packages/document/src/editor/review/types.ts:4
MergeValuestype#
type MergeValues = Record<string, unknown>;Defined in packages/document/src/types.ts:641
NoteKindtype#
type NoteKind = 'footnote' | 'endnote';Defined in packages/document/src/editor/objects/types.ts:162
NoteNumberFormattype#
type NoteNumberFormat = 'decimal' | 'lowerRoman' | 'upperRoman' | 'lowerLetter' | 'upperLetter' | 'chicago';Defined in packages/document/src/editor/objects/types.ts:163
ObjectDialogNametype#
type ObjectDialogName =
| 'insertTable'
| 'tableProperties'
| 'splitCells'
| 'sortTable'
| 'formula'
| 'textToTable'
| 'tableToText'
| 'borders'
| 'imageSize'
| 'imageLayout'
| 'imageAltText'
| 'imageCompress'
| 'shapeFormat'
| 'equation'
| 'bookmark'
| 'crossReference'
| 'caption'
| 'tableOfContents'
| 'tableOfFigures'
| 'footnote'
| 'noteOptions'
| 'contentControl';Defined in packages/document/src/editor/objects/types.ts:81
ObjectsCommandtype#
type ObjectsCommand =
| 'objectDialog'
| 'updateFields'
| 'cellBorders'
| 'cellShading'
| 'cellVerticalAlign'
| 'cellTextDirection'
| 'cellMargins'
| 'distributeRows'
| 'distributeColumns'
| 'autofitTable'
| 'rowHeight'
| 'columnWidth'
| 'sortTable'
| 'insertFormula'
| 'textToTable'
| 'tableToText'
| 'tableStyle'
| 'tableStyleOptions'
| 'tableProperties'
| 'splitCells'
| 'selectRow'
| 'selectColumn'
| 'selectTable'
| 'deleteCells'
| 'drawBorders'
| 'tableTool'
| 'paintCellEdges'
| 'imageWrap'
| 'imagePosition'
| 'imageRotate'
| 'imageFlip'
| 'imageCrop'
| 'imageCropMode'
| 'imageReset'
| 'imageReplace'
| 'imageCompress'
| 'imageDecorative'
| 'imageBorder'
| 'imageEffects'
| 'insertChart'
| 'editChart'
| 'imageNudge'
| 'insertShape'
| 'insertTextBox'
| 'shapeStyle'
| 'insertEquation'
| 'insertEmbeddedObject'
| 'openEmbeddedObject'
| 'downloadEmbeddedObject'
| 'insertBookmark'
| 'deleteBookmark'
| 'goToBookmark'
| 'showBookmarks'
| 'insertCrossReference'
| 'insertCaption'
| 'insertTableOfFigures'
| 'tableOfContentsOptions'
| 'insertFootnote'
| 'insertEndnote'
| 'nextFootnote'
| 'previousFootnote'
| 'convertNotes'
| 'deleteNote'
| 'noteFormat'
| 'noteSettings'
| 'insertContentControl'
| 'contentControlProperties'
| 'removeContentControl'
| 'formMode'
| 'insertDateField'
| 'insertCells'
| 'shapeEditText'
| 'restrictEditing'
| 'toggleFieldCodes'
| 'mergePreview';Defined in packages/document/src/editor/objects/types.ts:4
ObjectWraptype#
type ObjectWrap = 'inline' | 'square' | 'tight' | 'topBottom' | 'behind' | 'inFront';Defined in packages/document/src/editor/objects/types.ts:150
OrderedListStyletype#
type OrderedListStyle = 'decimal' | 'lowerAlpha' | 'upperAlpha' | 'lowerRoman' | 'upperRoman';Defined in packages/document/src/types.ts:560
PageNumberFormattype#
type PageNumberFormat =
'decimal' | 'upperRoman' | 'lowerRoman' | 'upperLetter' | 'lowerLetter' | 'numberInDash' | (string & {});Defined in packages/document/src/types.ts:80
PageOrientationtype#
type PageOrientation = 'portrait' | 'landscape';Defined in packages/document/src/types.ts:43
PageSizeNametype#
type PageSizeName = 'A3' | 'A4' | 'A5' | 'Letter' | 'Legal' | 'Executive';Defined in packages/document/src/types.ts:42
ParagraphStyleIdtype#
type ParagraphStyleId =
| 'Normal'
| 'Title'
| 'Subtitle'
| 'Heading1'
| 'Heading2'
| 'Heading3'
| 'Heading4'
| 'Heading5'
| 'Heading6'
| 'Quote'
| 'Code';Defined in packages/document/src/types.ts:546
PasteModetype#
type PasteMode = 'keepSource' | 'mergeFormatting' | 'textOnly' | 'picture';Defined in packages/document/src/editor/editing/types.ts:192
PdfArtifactTypetype#
type PdfArtifactType = 'header' | 'footer' | 'watermark' | 'pagination' | 'layout';Defined in packages/document/src/layout/pdf/layout-tree.ts:7
PdfFontLoadertype#
type PdfFontLoader = (
family: string,
style: { bold: boolean; italic: boolean },
) => Promise<ArrayBuffer | Uint8Array | null>;Defined in packages/document/src/layout/pdf/font-loading.ts:5
PdfItemtype#
type PdfItem = PdfTextRun | PdfRect | PdfLine | PdfPath | PdfImage | PdfLinkArea | PdfDestination | PdfGroup;Defined in packages/document/src/layout/pdf/layout-tree.ts:160
PdfMatrixtype#
type PdfMatrix = readonly [number, number, number, number, number, number];Defined in packages/document/src/layout/pdf/layout-tree.ts:150
PdfPathCommandtype#
type PdfPathCommand =
| readonly ['M', number, number]
| readonly ['L', number, number]
| readonly ['C', number, number, number, number, number, number]
| readonly ['Z'];Defined in packages/document/src/layout/pdf/layout-tree.ts:104
PdfStructTypetype#
type PdfStructType =
| 'P'
| 'H1'
| 'H2'
| 'H3'
| 'H4'
| 'H5'
| 'H6'
| 'L'
| 'LI'
| 'Lbl'
| 'LBody'
| 'Table'
| 'TR'
| 'TH'
| 'TD'
| 'Figure'
| 'Link'
| 'Note'
| 'Span'
| 'TOC'
| 'TOCI'
| 'Sect'
| 'BlockQuote'
| 'Code';Defined in packages/document/src/layout/pdf/layout-tree.ts:9
PdfUnderlineStyletype#
type PdfUnderlineStyle = 'single' | 'double' | 'thick' | 'dotted' | 'dash' | 'dotDash' | 'wave';Defined in packages/document/src/layout/pdf/layout-tree.ts:53
ProtectionModetype#
type ProtectionMode = 'readOnly' | 'comments' | 'trackedChanges' | 'forms';Defined in packages/document/src/types.ts:174
ReadAloudCommandtype#
type ReadAloudCommand = 'readAloud';Defined in packages/document/src/editor/read-aloud.ts:41
ReviewCommandtype#
type ReviewCommand =
| 'markupMode'
| 'acceptChange'
| 'rejectChange'
| 'acceptAndNext'
| 'rejectAndNext'
| 'acceptShownChanges'
| 'rejectShownChanges'
| 'nextChange'
| 'previousChange'
| 'revisionsPane'
| 'compareDialog'
| 'compareSideBySide'
| 'closeSideBySide'
| 'combineDialog'
| 'saveSnapshot'
| 'versionHistoryPane';Defined in packages/document/src/editor/review/types.ts:93
RevisionChangeKindtype#
type RevisionChangeKind =
| 'insert'
| 'delete'
| 'replace'
| 'format'
| 'paragraph'
| 'move'
| 'tableRow'
| 'tableCell'
| 'tableFormat'
| 'sectionFormat'
| 'numbering';Defined in packages/document/src/editor/review/types.ts:6
RibbonCommandtype#
type RibbonCommand =
| 'cut'
| 'copy'
| 'paste'
| 'toggleRibbon'
| 'readMode'
| 'focusMode'
| 'fitWidth'
| 'fitPage'
| 'setTabStops'
| 'clearTabStops'
| 'tabsDialog'
| 'toggleGridlines'
| 'commandSearch'
| 'keyboardShortcuts';Defined in packages/document/src/editor/ribbon/types.ts:3
RibbonTabNametype#
type RibbonTabName = 'home' | 'insert' | 'draw' | 'layout' | 'references' | 'review' | 'view' | (string & {});Defined in packages/document/src/editor/ribbon/types.ts:19
SectionBreakTypetype#
type SectionBreakType = 'nextPage' | 'continuous' | 'evenPage' | 'oddPage' | 'nextColumn';Defined in packages/document/src/types.ts:71
ShapeKindtype#
type ShapeKind = 'rect' | 'roundRect' | 'ellipse' | 'line' | 'arrow' | 'callout';Defined in packages/document/src/editor/objects/types.ts:148
SourceTypetype#
type SourceType =
| 'Book'
| 'BookSection'
| 'JournalArticle'
| 'ArticleInAPeriodical'
| 'ConferenceProceedings'
| 'Report'
| 'InternetSite'
| 'DocumentFromInternetSite'
| 'Misc'
| (string & {});Defined in packages/document/src/types.ts:481
SpellCheckertype#
type SpellChecker = (
text: string,
language: string,
) => Promise<readonly SpellingIssue[]> | readonly SpellingIssue[];Defined in packages/document/src/types.ts:919
TableDirectiontype#
type TableDirection = 'ABOVE' | 'BELOW' | 'LEFT' | 'RIGHT';Defined in packages/document/src/editor/objects/types.ts:114
TabStopAlignmenttype#
type TabStopAlignment = 'left' | 'center' | 'right' | 'decimal' | 'bar';Defined in packages/document/src/editor/ribbon/types.ts:21
TabStopLeadertype#
type TabStopLeader = 'none' | 'dot' | 'hyphen' | 'underscore';Defined in packages/document/src/editor/ribbon/types.ts:23
TextAlignmenttype#
type TextAlignment = 'left' | 'center' | 'right' | 'justify';Defined in packages/document/src/types.ts:559
ToolbarItemIdtype#
type ToolbarItemId =
| 'undo'
| 'redo'
| 'formatPainter'
| 'paragraphStyle'
| 'fontFamily'
| 'fontSize'
| 'bold'
| 'italic'
| 'underline'
| 'strike'
| 'superscript'
| 'subscript'
| 'textColor'
| 'highlight'
| 'clearFormatting'
| 'alignLeft'
| 'alignCenter'
| 'alignRight'
| 'alignJustify'
| 'lineSpacing'
| 'bulletList'
| 'orderedList'
| 'outdent'
| 'indent'
| 'link'
| 'image'
| 'table'
| 'pageBreak'
| 'horizontalRule'
| 'symbol'
| 'field'
| 'tableOfContents'
| 'comment'
| 'trackChanges'
| 'showMarkup'
| 'find'
| 'pageSetup'
| 'layout'
| 'outline'
| 'zoom'
| 'print'
| 'separator';Defined in packages/document/src/types.ts:755
TrackedChangeKindtype#
type TrackedChangeKind = 'insertion' | 'deletion';Defined in packages/document/src/types.ts:563
UnderlineStyletype#
type UnderlineStyle = (typeof UNDERLINE_STYLES)[number];Defined in packages/document/src/model/text-effects.ts:3
ZipLimitCodetype#
type ZipLimitCode = 'too-many-entries' | 'entry-too-large' | 'archive-too-large' | 'ratio-too-high';Defined in packages/document/src/docx/errors.ts:8
@birchui/document/collab#
createAuthorityBackendfunction#
function createAuthorityBackend(authority: CollabAuthority, start: CollabBackendStart = {}): CollabBackend| Parameter | Type | Description |
|---|---|---|
authority | CollabAuthority | — |
startoptional | CollabBackendStart | — |
Defined in packages/document/src/editor/collab/backend.ts:146
createBroadcastChannelBackendfunction#
function createBroadcastChannelBackend(options: CollabBroadcastBackendOptions): CollabBackend| Parameter | Type | Description |
|---|---|---|
options | CollabBroadcastBackendOptions | — |
Defined in packages/document/src/editor/collab/broadcast-backend.ts:98
createCollabAuthorityfunction#
function createCollabAuthority(options: CollabAuthorityOptions = {}): CollabAuthority| Parameter | Type | Description |
|---|---|---|
optionsoptional | CollabAuthorityOptions | — |
Defined in packages/document/src/editor/collab/authority.ts:409
createCollabDocumentfunction#
function createCollabDocument(document?: DocumentInput | null, limits?: Partial<CollabDocumentLimits>): CollabDocument| Parameter | Type | Description |
|---|---|---|
documentoptional | DocumentInput | null | — |
limitsoptional | Partial<CollabDocumentLimits> | — |
Defined in packages/document/src/editor/collab/document-state.ts:291
createCollabIdfunction#
function createCollabId(prefix = '', random?: () => number): string| Parameter | Type | Description |
|---|---|---|
prefixoptional | unknown | — |
randomoptional | () => number | — |
Defined in packages/document/src/editor/collab/ids.ts:19
createCollabProviderfunction#
function createCollabProvider(backend: CollabBackend, options: CollabBackendProviderOptions = {}): CollabBackendProvider| Parameter | Type | Description |
|---|---|---|
backend | CollabBackend | — |
optionsoptional | CollabBackendProviderOptions | — |
Defined in packages/document/src/editor/collab/backend.ts:37
createIndexedDbOfflineStorefunction#
function createIndexedDbOfflineStore(options: { key: string; database?: string }): CollabOfflineStoreKeeps unsent edits in IndexedDB under key, which should name the document and the signed-in person, so a tab
that closes while offline finds them again.
| Parameter | Type | Description |
|---|---|---|
options | { key: string; database?: string } | — |
Defined in packages/document/src/editor/collab/offline-store.ts:30
createLoopbackHubfunction#
function createLoopbackHub(options: LoopbackHubOptions = {}): LoopbackHub| Parameter | Type | Description |
|---|---|---|
optionsoptional | LoopbackHubOptions | — |
Defined in packages/document/src/editor/collab/loopback.ts:283
createMemoryOfflineStorefunction#
function createMemoryOfflineStore(): CollabOfflineStoreDefined in packages/document/src/editor/collab/offline-store.ts:6
createSocketBackendfunction#
function createSocketBackend(options: CollabSocketBackendOptions): CollabBackend| Parameter | Type | Description |
|---|---|---|
options | CollabSocketBackendOptions | — |
Defined in packages/document/src/editor/collab/socket-backend.ts:131
createWireBackendfunction#
function createWireBackend(link: CollabWireLink, options: CollabWireBackendOptions = {}): CollabBackend| Parameter | Type | Description |
|---|---|---|
link | CollabWireLink | — |
optionsoptional | CollabWireBackendOptions | — |
Defined in packages/document/src/editor/collab/wire.ts:37
createWireEndpointfunction#
function createWireEndpoint(authority: CollabAuthority, send: (message: CollabWireMessage) => void): CollabWireEndpoint| Parameter | Type | Description |
|---|---|---|
authority | CollabAuthority | — |
send | (message: CollabWireMessage) => void | — |
Defined in packages/document/src/editor/collab/wire.ts:167
hostBroadcastChannelfunction#
function hostBroadcastChannel(authority: CollabAuthority, channel: CollabBroadcastPort | string, options: { hostTimeout?: number } = {}): { close(): void }| Parameter | Type | Description |
|---|---|---|
authority | CollabAuthority | — |
channel | CollabBroadcastPort | string | — |
optionsoptional | { hostTimeout?: number } | — |
Defined in packages/document/src/editor/collab/broadcast-backend.ts:102
DEFAULT_COLLAB_LIMITSconst#
const DEFAULT_COLLAB_LIMITS: Readonly<CollabDocumentLimits>Defined in packages/document/src/editor/collab/document-state.ts:20
CollabApiinterface#
interface CollabApi| Member | Type | Description |
|---|---|---|
getCollabVersion() | () => number | — |
getCollabStatus() | () => CollabStatus | — |
getCollabConnection() | () => CollabConnectionStatus | — |
saveCollabVersion() | (name: string) => Promise<CollabVersionInfo | null> | — |
listCollabVersions() | () => Promise<CollabVersionInfo[]> | — |
restoreCollabVersion() | (id: string) => Promise<boolean> | — |
diffCollabVersions() | (fromId: string, toId: string | null, options?: CollabVersionDiffOptions) => Promise<DocNodeJSON | null> | — |
lockRange() | (range?: { from: number; to: number }) => Promise<CollabLock | null> | — |
unlockRange() | (id: string) => void | — |
getLocks() | () => CollabLock[] | — |
sendableSteps() | () => CollabStepsPayload | null | — |
receiveSteps() | (payload: CollabRemotePayload) => boolean | — |
resetCollab() | (snapshot: CollabSnapshot) => void | — |
getCollaborators() | () => Collaborator[] | — |
Defined in packages/document/src/editor/collab/types.ts:410
CollabAuthorityinterface#
interface CollabAuthority| Property | Type | Description |
|---|---|---|
join() | (clientId: CollabClientId, emit: (event: CollabBackendEvent) => void) => CollabAuthorityPeer | — |
version() | () => number | — |
metaVersion() | () => number | — |
baseVersion() | () => number | — |
steps() | () => CollabLogEntry[] | — |
snapshot() | () => CollabSnapshot | null | — |
document() | () => DocumentData | null | The authority's own document at its current version, or null when it runs with trustClients. |
locks() | () => CollabLockState | — |
clients() | () => CollabClientId[] | — |
saveVersion() | (input: CollabVersionInput, clientId: CollabClientId) => CollabVersionInfo | — |
listVersions() | () => CollabVersionInfo[] | — |
loadVersion() | (id: string) => CollabVersionRecord | null | — |
storedVersions() | () => CollabStoredVersion[] | The named versions as they are kept: a full document now and then, and the steps since the previous one otherwise. |
destroy() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:279
CollabAuthorityOptionsinterface#
interface CollabAuthorityOptions| Property | Type | Description |
|---|---|---|
documentoptional | DocumentInput | null | The document at version 0. Without it, and without snapshot, the authority starts from an empty document. |
limitsoptional | Partial<CollabDocumentLimits> | — |
trustClientsoptional | boolean | Relay steps without applying them. Only for a process where every client is your own code, such as a unit test of a transport: a client can then store any document and move any lock. |
snapshotoptional | CollabSnapshot | null | — |
snapshotEveryoptional | number | — |
retainStepsoptional | number | — |
versionsoptional | readonly CollabStoredVersion[] | null | Named versions saved earlier, as storedVersions() returned them. |
nowoptional | () => number | — |
createIdoptional | () => string | — |
Defined in packages/document/src/editor/collab/types.ts:245
CollabAuthorityPeerinterface#
interface CollabAuthorityPeer| Property | Type | Description |
|---|---|---|
clientIdreadonly | CollabClientId | — |
submit() | (payload: CollabStepsPayload) => CollabSubmitResult | — |
pull() | (sinceVersion: number, sinceMeta: number) => void | — |
setPresence() | (state: PresenceState | null) => void | — |
sendSnapshot() | (snapshot: CollabSnapshot) => boolean | — |
acquireLock() | (request: CollabLockRequest) => CollabLock | null | — |
releaseLock() | (id: string) => void | — |
leave() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:268
CollabBackendinterface#
interface CollabBackend| Property | Type | Description |
|---|---|---|
clientIdreadonly | CollabClientId | — |
open() | (emit: (event: CollabBackendEvent) => void) => void | — |
version() | () => number | — |
metaVersion() | () => number | — |
submit() | (payload: CollabStepsPayload) => Promise<CollabSubmitResult> | — |
pull() | (sinceVersion: number, sinceMeta: number) => void | — |
setPresence()optional | (state: PresenceState | null) => void | — |
sendSnapshot()optional | (snapshot: CollabSnapshot) => void | — |
locksoptional | Pick<CollabLockChannel, 'acquire' | 'release'> | — |
versionsoptional | CollabVersionChannel | — |
close() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:197
CollabBackendProviderinterface#
interface CollabBackendProvider extends CollabProvider| Property | Type | Description |
|---|---|---|
clientId | CollabClientId | — |
connection() | () => CollabConnectionStatus | — |
close() | () => void | — |
version | number | (() => number) | Inherited from CollabProvider. |
metaVersionoptional | number | (() => number) | undefined | Inherited from CollabProvider. |
sendSteps() | (payload: CollabStepsPayload) => CollabSendResult | Promise<CollabSendResult> | Inherited from CollabProvider. |
onRemoteSteps() | (handler: (payload: CollabRemotePayload) => void) => () => void | Inherited from CollabProvider. |
requestSteps()optional | ((sinceVersion: number, sinceMeta?: number) => void) | undefined | Inherited from CollabProvider. |
onStatus()optional | ((handler: (status: "online" | "offline") => void) => () => void) | undefined | Inherited from CollabProvider. |
onConnection()optional | ((handler: (status: CollabConnectionStatus) => void) => () => void) | undefined | Inherited from CollabProvider. |
onReset()optional | ((handler: (snapshot: CollabSnapshot) => void) => () => void) | undefined | Inherited from CollabProvider. |
presenceoptional | CollabPresenceChannel | undefined | Inherited from CollabProvider. |
presenceTimeoutoptional | number | undefined | Inherited from CollabProvider. |
commentsoptional | CollabCommentChannel | undefined | Inherited from CollabProvider. |
versionsoptional | CollabVersionChannel | undefined | Inherited from CollabProvider. |
locksoptional | CollabLockChannel | undefined | Inherited from CollabProvider. |
snapshotsoptional | CollabSnapshotChannel | undefined | Inherited from CollabProvider. |
Defined in packages/document/src/editor/collab/types.ts:215
CollabBackendProviderOptionsinterface#
interface CollabBackendProviderOptions| Property | Type | Description |
|---|---|---|
presenceTimeoutoptional | number | — |
Defined in packages/document/src/editor/collab/types.ts:211
CollabBackendStartinterface#
interface CollabBackendStart| Property | Type | Description |
|---|---|---|
clientIdoptional | CollabClientId | — |
versionoptional | number | — |
metaVersionoptional | number | — |
Defined in packages/document/src/editor/collab/types.ts:311
CollabBroadcastBackendOptionsinterface#
interface CollabBroadcastBackendOptions extends CollabWireBackendOptions| Property | Type | Description |
|---|---|---|
channel | CollabBroadcastPort | string | — |
hostTimeoutoptional | number | — |
roomoptional | string | undefined | Inherited from CollabWireBackendOptions. |
requestTimeoutoptional | number | undefined | Inherited from CollabWireBackendOptions. |
clientIdoptional | CollabClientId | undefined | Inherited from CollabBackendStart. |
versionoptional | number | undefined | Inherited from CollabBackendStart. |
metaVersionoptional | number | undefined | Inherited from CollabBackendStart. |
Defined in packages/document/src/editor/collab/types.ts:347
CollabBroadcastPortinterface#
interface CollabBroadcastPort| Property | Type | Description |
|---|---|---|
postMessage() | (message: unknown) => void | — |
addEventListener() | (type: 'message', listener: (event: { data: unknown }) => void) => void | — |
removeEventListener() | (type: 'message', listener: (event: { data: unknown }) => void) => void | — |
close()optional | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:340
CollabCommentChannelinterface#
interface CollabCommentChannel| Property | Type | Description |
|---|---|---|
send() | (operation: CollabCommentOperation) => void | — |
subscribe() | (handler: (operation: CollabCommentOperation) => void) => () => void | — |
Defined in packages/document/src/editor/collab/types.ts:164
CollabDocumentinterface#
interface CollabDocument| Property | Type | Description |
|---|---|---|
apply() | (steps: readonly unknown[]) => CollabDocumentResult | — |
prepare() | (steps: readonly unknown[]) => CollabDocumentPrepared | Checks the steps against the current document without changing it; commit() then makes them current. |
checkMetaOperations() | (operations: readonly CollabMetaOperation[]) => CollabDocumentResult | — |
applyMeta() | (operations: readonly CollabMetaOperation[]) => CollabDocumentResult | — |
size() | () => number | — |
snapshot() | () => DocumentData | — |
Defined in packages/document/src/editor/collab/types.ts:235
CollabDocumentLimitsinterface#
interface CollabDocumentLimits| Property | Type | Description |
|---|---|---|
maxStepsPerSubmit | number | — |
maxSubmitBytes | number | — |
maxDocumentSize | number | — |
maxMetaPerSubmit | number | — |
maxCommentLength | number | — |
Defined in packages/document/src/editor/collab/types.ts:221
CollabEventsinterface#
interface CollabEvents| Property | Type | Description |
|---|---|---|
collabStatus | CollabStatus | — |
collabConnection | { status: CollabConnectionStatus; previous: CollabConnectionStatus } | — |
collabRejected | { reason: CollabRejectReason; steps: number } | — |
collabRestored | { steps: number; version: number } | — |
presenceChange | { collaborators: Collaborator[] } | — |
locksChange | { locks: CollabLock[] } | — |
Defined in packages/document/src/editor/collab/types.ts:397
CollabLockinterface#
interface CollabLockDefined in packages/document/src/editor/collab/types.ts:81
CollabLockChannelinterface#
interface CollabLockChannel| Property | Type | Description |
|---|---|---|
acquire() | (request: CollabLockRequest) => Promise<CollabLock | null> | — |
release() | (id: string) => void | — |
subscribe() | (handler: (state: CollabLockState) => void) => () => void | — |
Defined in packages/document/src/editor/collab/types.ts:102
CollabLockRequestinterface#
interface CollabLockRequestDefined in packages/document/src/editor/collab/types.ts:95
CollabLockStateinterface#
interface CollabLockState| Property | Type | Description |
|---|---|---|
version | number | — |
locks | CollabLock[] | — |
revisionoptional | number | — |
Defined in packages/document/src/editor/collab/types.ts:89
CollabLogEntryinterface#
interface CollabLogEntry| Property | Type | Description |
|---|---|---|
step | unknown | — |
clientId | CollabClientId | — |
Defined in packages/document/src/editor/collab/types.ts:263
CollabOfflineRecordinterface#
interface CollabOfflineRecord| Property | Type | Description |
|---|---|---|
version | number | The version the unsent steps start from. |
document | DocNodeJSON | The document body at version, without the unsent steps. |
steps | unknown[] | — |
clientId | CollabClientId | — |
savedAt | number | — |
Defined in packages/document/src/editor/collab/types.ts:372
CollabOfflineStoreinterface#
interface CollabOfflineStore| Property | Type | Description |
|---|---|---|
load() | () => CollabOfflineRecord | null | Promise<CollabOfflineRecord | null> | — |
save() | (record: CollabOfflineRecord) => void | Promise<void> | — |
clear() | () => void | Promise<void> | — |
Defined in packages/document/src/editor/collab/types.ts:382
CollabOptionsinterface#
interface CollabOptions| Property | Type | Description |
|---|---|---|
collaboptional | CollabProvider | null | — |
collabStorageoptional | CollabOfflineStore | null | Where edits that have not reached the authority are kept. Without it they live in memory and are lost when the
tab closes. createIndexedDbOfflineStore({ key }) keeps them across a reload. |
Defined in packages/document/src/editor/collab/types.ts:388
Collaboratorinterface#
interface Collaborator| Property | Type | Description |
|---|---|---|
clientId | CollabClientId | — |
name | string | — |
color | string | — |
anchor | number | null | — |
head | number | null | — |
focused | boolean | — |
Defined in packages/document/src/editor/collab/types.ts:363
CollabPresenceChannelinterface#
interface CollabPresenceChannel| Property | Type | Description |
|---|---|---|
send() | (state: PresenceState) => void | — |
subscribe() | (handler: (states: Record<string, PresenceState>) => void) => () => void | — |
Defined in packages/document/src/editor/collab/types.ts:159
CollabProviderinterface#
interface CollabProvider| Property | Type | Description |
|---|---|---|
version | number | (() => number) | — |
clientIdoptional | CollabClientId | — |
metaVersionoptional | number | (() => number) | — |
sendSteps() | (payload: CollabStepsPayload) => CollabSendResult | Promise<CollabSendResult> | — |
onRemoteSteps() | (handler: (payload: CollabRemotePayload) => void) => () => void | — |
requestSteps()optional | (sinceVersion: number, sinceMeta?: number) => void | — |
onStatus()optional | (handler: (status: 'online' | 'offline') => void) => () => void | — |
onConnection()optional | (handler: (status: CollabConnectionStatus) => void) => () => void | — |
onReset()optional | (handler: (snapshot: CollabSnapshot) => void) => () => void | — |
presenceoptional | CollabPresenceChannel | — |
presenceTimeoutoptional | number | — |
commentsoptional | CollabCommentChannel | — |
versionsoptional | CollabVersionChannel | — |
locksoptional | CollabLockChannel | — |
snapshotsoptional | CollabSnapshotChannel | — |
Defined in packages/document/src/editor/collab/types.ts:169
CollabRemotePayloadinterface#
interface CollabRemotePayload| Property | Type | Description |
|---|---|---|
steps | unknown[] | — |
clientIds | CollabClientId[] | — |
versionoptional | number | — |
metaoptional | CollabMetaOperation[] | — |
metaClientIdoptional | CollabClientId | — |
metaVersionoptional | number | — |
metaClientIdsoptional | CollabClientId[] | — |
Defined in packages/document/src/editor/collab/types.ts:46
CollabSnapshotinterface#
interface CollabSnapshot| Property | Type | Description |
|---|---|---|
document | DocumentInput | — |
version | number | — |
metaVersionoptional | number | — |
Defined in packages/document/src/editor/collab/types.ts:65
CollabSnapshotChannelinterface#
interface CollabSnapshotChannel| Property | Type | Description |
|---|---|---|
send() | (snapshot: CollabSnapshot) => void | — |
subscribe() | (handler: () => void) => () => void | — |
Defined in packages/document/src/editor/collab/types.ts:154
CollabSocketBackendOptionsinterface#
interface CollabSocketBackendOptions extends CollabWireBackendOptions| Property | Type | Description |
|---|---|---|
connect | () => CollabSocketLike | — |
reconnectMinoptional | number | — |
reconnectMaxoptional | number | — |
maxAttemptsoptional | number | — |
heartbeatoptional | number | — |
roomoptional | string | undefined | Inherited from CollabWireBackendOptions. |
requestTimeoutoptional | number | undefined | Inherited from CollabWireBackendOptions. |
clientIdoptional | CollabClientId | undefined | Inherited from CollabBackendStart. |
versionoptional | number | undefined | Inherited from CollabBackendStart. |
metaVersionoptional | number | undefined | Inherited from CollabBackendStart. |
Defined in packages/document/src/editor/collab/types.ts:332
CollabSocketLikeinterface#
interface CollabSocketLike| Property | Type | Description |
|---|---|---|
readyState | number | — |
send() | (data: string) => void | — |
close() | (code?: number, reason?: string) => void | — |
addEventListener() | (type: 'open' | 'message' | 'close' | 'error', listener: (event: { data?: unknown; type?: string }) => void) => void | — |
Defined in packages/document/src/editor/collab/types.ts:322
CollabStatusinterface#
interface CollabStatus| Property | Type | Description |
|---|---|---|
state | CollabState | — |
version | number | — |
unconfirmed | number | — |
clientId | CollabClientId | null | — |
online | boolean | — |
connection | CollabConnectionStatus | — |
Defined in packages/document/src/editor/collab/types.ts:354
CollabStepFootprintinterface#
interface CollabStepFootprintDefined in packages/document/src/editor/collab/types.ts:32
CollabStepsPayloadinterface#
interface CollabStepsPayload| Property | Type | Description |
|---|---|---|
version | number | — |
steps | unknown[] | — |
clientId | CollabClientId | — |
metaoptional | CollabMetaOperation[] | — |
footprintoptional | CollabStepFootprint[] | — |
Defined in packages/document/src/editor/collab/types.ts:38
CollabSubmitResultinterface#
interface CollabSubmitResult| Property | Type | Description |
|---|---|---|
accepted | boolean | — |
versionoptional | number | — |
reasonoptional | CollabRejectReason | — |
detailoptional | string | — |
Defined in packages/document/src/editor/collab/types.ts:58
CollabVersionChannelinterface#
interface CollabVersionChannel| Property | Type | Description |
|---|---|---|
save() | (input: CollabVersionInput) => Promise<CollabVersionInfo> | — |
list() | () => Promise<CollabVersionInfo[]> | — |
load() | (id: string) => Promise<CollabVersionRecord | null> | — |
Defined in packages/document/src/editor/collab/types.ts:148
CollabVersionDeltainterface#
interface CollabVersionDelta extends CollabVersionInfoA version kept as the steps and document updates made since the version named by parent.
| Property | Type | Description |
|---|---|---|
metaVersion | number | — |
parent | string | — |
steps | unknown[] | — |
meta | CollabVersionMetaEntry[] | — |
id | string | Inherited from CollabVersionInfo. |
name | string | Inherited from CollabVersionInfo. |
createdAt | string | Inherited from CollabVersionInfo. |
author | string | Inherited from CollabVersionInfo. |
clientId | CollabClientId | Inherited from CollabVersionInfo. |
version | number | Inherited from CollabVersionInfo. |
Defined in packages/document/src/editor/collab/types.ts:132
CollabVersionDiffOptionsinterface#
interface CollabVersionDiffOptions extends CompareOptions| Property | Type | Description |
|---|---|---|
idPrefixoptional | string | — |
authoroptional | string | undefined | Inherited from CompareOptions. |
dateoptional | string | undefined | Inherited from CompareOptions. |
granularityoptional | "word" | "character" | undefined | Inherited from CompareOptions. |
movesoptional | boolean | undefined | Inherited from CompareOptions. |
formattingoptional | boolean | undefined | Inherited from CompareOptions. |
Defined in packages/document/src/editor/collab/types.ts:406
CollabVersionInfointerface#
interface CollabVersionInfo| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
createdAt | string | — |
author | string | — |
clientId | CollabClientId | — |
version | number | — |
Defined in packages/document/src/editor/collab/types.ts:108
CollabVersionInputinterface#
interface CollabVersionInput| Property | Type | Description |
|---|---|---|
name | string | — |
author | string | — |
version | number | — |
document | DocumentInput | — |
Defined in packages/document/src/editor/collab/types.ts:141
CollabVersionMetaEntryinterface#
interface CollabVersionMetaEntry| Property | Type | Description |
|---|---|---|
at | number | The step version the operation was applied at. |
operation | CollabMetaOperation | — |
Defined in packages/document/src/editor/collab/types.ts:125
CollabVersionRecordinterface#
interface CollabVersionRecord extends CollabVersionInfo| Property | Type | Description |
|---|---|---|
document | DocumentInput | — |
id | string | Inherited from CollabVersionInfo. |
name | string | Inherited from CollabVersionInfo. |
createdAt | string | Inherited from CollabVersionInfo. |
author | string | Inherited from CollabVersionInfo. |
clientId | CollabClientId | Inherited from CollabVersionInfo. |
version | number | Inherited from CollabVersionInfo. |
Defined in packages/document/src/editor/collab/types.ts:117
CollabVersionSnapshotinterface#
interface CollabVersionSnapshot extends CollabVersionRecord| Property | Type | Description |
|---|---|---|
metaVersionoptional | number | — |
document | DocumentInput | Inherited from CollabVersionRecord. |
id | string | Inherited from CollabVersionInfo. |
name | string | Inherited from CollabVersionInfo. |
createdAt | string | Inherited from CollabVersionInfo. |
author | string | Inherited from CollabVersionInfo. |
clientId | CollabClientId | Inherited from CollabVersionInfo. |
version | number | Inherited from CollabVersionInfo. |
Defined in packages/document/src/editor/collab/types.ts:121
CollabWireBackendOptionsinterface#
interface CollabWireBackendOptions extends CollabBackendStart| Property | Type | Description |
|---|---|---|
roomoptional | string | — |
requestTimeoutoptional | number | — |
clientIdoptional | CollabClientId | undefined | Inherited from CollabBackendStart. |
versionoptional | number | undefined | Inherited from CollabBackendStart. |
metaVersionoptional | number | undefined | Inherited from CollabBackendStart. |
Defined in packages/document/src/editor/collab/types.ts:317
CollabWireEndpointinterface#
interface CollabWireEndpoint| Property | Type | Description |
|---|---|---|
receive() | (message: CollabWireMessage) => void | — |
close() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:306
CollabWireLinkinterface#
interface CollabWireLink| Property | Type | Description |
|---|---|---|
send() | (message: CollabWireMessage) => boolean | — |
open() | (handlers: { message(message: CollabWireMessage): void; status(status: CollabConnectionStatus): void }) => void | — |
close() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:300
LoopbackConnectioninterface#
interface LoopbackConnection extends CollabProvider| Property | Type | Description |
|---|---|---|
clientId | CollabClientId | — |
version | () => number | — |
metaVersion | () => number | — |
requestSteps() | (sinceVersion: number, sinceMeta?: number) => void | — |
presence | CollabPresenceChannel | — |
comments | CollabCommentChannel | — |
versions | CollabVersionChannel | — |
locks | CollabLockChannel | — |
snapshots | CollabSnapshotChannel | — |
setOnline() | (online: boolean) => void | — |
setConnection() | (status: CollabConnectionStatus) => void | — |
isOnline() | () => boolean | — |
reset() | (snapshot: CollabSnapshot) => void | — |
disconnect() | () => void | — |
sendSteps() | (payload: CollabStepsPayload) => CollabSendResult | Promise<CollabSendResult> | Inherited from CollabProvider. |
onRemoteSteps() | (handler: (payload: CollabRemotePayload) => void) => () => void | Inherited from CollabProvider. |
onStatus()optional | ((handler: (status: "online" | "offline") => void) => () => void) | undefined | Inherited from CollabProvider. |
onConnection()optional | ((handler: (status: CollabConnectionStatus) => void) => () => void) | undefined | Inherited from CollabProvider. |
onReset()optional | ((handler: (snapshot: CollabSnapshot) => void) => () => void) | undefined | Inherited from CollabProvider. |
presenceTimeoutoptional | number | undefined | Inherited from CollabProvider. |
Defined in packages/document/src/editor/collab/types.ts:439
LoopbackHubinterface#
interface LoopbackHub| Property | Type | Description |
|---|---|---|
connect() | (clientId: CollabClientId) => LoopbackConnection | — |
version() | () => number | — |
getDocumentSteps() | () => { step: unknown; clientId: CollabClientId }[] | — |
authority() | () => CollabAuthority | — |
pending() | () => number | — |
step() | () => boolean | — |
flush() | (limit?: number) => number | — |
destroy() | () => void | — |
Defined in packages/document/src/editor/collab/types.ts:456
LoopbackHubOptionsinterface#
interface LoopbackHubOptions extends CollabAuthorityOptions| Property | Type | Description |
|---|---|---|
latencyoptional | number | — |
jitteroptional | number | — |
dropRateoptional | number | — |
manualoptional | boolean | — |
randomoptional | () => number | — |
documentoptional | DocumentInput | null | undefined | The document at version 0. Without it, and without snapshot, the authority starts from an empty document. Inherited from CollabAuthorityOptions. |
limitsoptional | Partial<CollabDocumentLimits> | undefined | Inherited from CollabAuthorityOptions. |
trustClientsoptional | boolean | undefined | Relay steps without applying them. Only for a process where every client is your own code, such as a unit test of a transport: a client can then store any document and move any lock. Inherited from CollabAuthorityOptions. |
snapshotoptional | CollabSnapshot | null | undefined | Inherited from CollabAuthorityOptions. |
snapshotEveryoptional | number | undefined | Inherited from CollabAuthorityOptions. |
retainStepsoptional | number | undefined | Inherited from CollabAuthorityOptions. |
versionsoptional | readonly CollabStoredVersion[] | null | undefined | Named versions saved earlier, as storedVersions() returned them. Inherited from CollabAuthorityOptions. |
nowoptional | (() => number) | undefined | Inherited from CollabAuthorityOptions. |
createIdoptional | (() => string) | undefined | Inherited from CollabAuthorityOptions. |
Defined in packages/document/src/editor/collab/types.ts:431
PresenceStateinterface#
interface PresenceState| Property | Type | Description |
|---|---|---|
clientId | CollabClientId | — |
name | string | — |
coloroptional | string | — |
anchor | number | null | — |
head | number | null | — |
focused | boolean | — |
clockoptional | number | — |
Defined in packages/document/src/editor/collab/types.ts:71
CollabBackendEventtype#
type CollabBackendEvent =
| { type: 'connection'; status: CollabConnectionStatus }
| { type: 'steps'; payload: CollabRemotePayload }
| { type: 'reset'; snapshot: CollabSnapshot }
| { type: 'presence'; states: Record<string, PresenceState> }
| { type: 'locks'; state: CollabLockState }
| { type: 'snapshotRequest' };Defined in packages/document/src/editor/collab/types.ts:189
CollabClientIdtype#
type CollabClientId = string | number;Defined in packages/document/src/editor/collab/types.ts:14
CollabCommandtype#
type CollabCommand = never;Defined in packages/document/src/editor/collab/types.ts:12
CollabCommentOperationtype#
type CollabCommentOperation =
| { type: 'add'; thread: CommentThread }
| { type: 'reply'; id: string; reply: CommentReply }
| { type: 'edit'; id: string; text: string }
| { type: 'resolve'; id: string; resolved: boolean }
| { type: 'delete'; id: string }
| { type: 'editReply'; id: string; replyId: string; text: string }
| { type: 'deleteReply'; id: string; replyId: string };Defined in packages/document/src/editor/collab/types.ts:16
CollabConnectionStatustype#
type CollabConnectionStatus = 'connected' | 'reconnecting' | 'offline';Defined in packages/document/src/editor/collab/types.ts:30
CollabDocumentPreparedtype#
type CollabDocumentPrepared =
{ ok: true; footprint: CollabStepFootprint[]; commit(): void } | { ok: false; reason: string };The authority's own copy of the document. Steps are applied to it, and a step that does not apply is refused.
Defined in packages/document/src/editor/collab/types.ts:232
CollabDocumentResulttype#
type CollabDocumentResult = { ok: true; footprint: CollabStepFootprint[] } | { ok: false; reason: string };Defined in packages/document/src/editor/collab/types.ts:229
CollabMetaOperationtype#
type CollabMetaOperation =
| { type: 'pageSetup'; page: PageSetup }
| { type: 'headerFooter'; parts: HeaderFooterContent }
| { type: 'comment'; operation: CollabCommentOperation };Defined in packages/document/src/editor/collab/types.ts:25
CollabRejectReasontype#
type CollabRejectReason = 'stale' | 'locked' | 'offline' | 'invalid';Defined in packages/document/src/editor/collab/types.ts:56
CollabSendResulttype#
type CollabSendResult = void | boolean | CollabSubmitResult;Defined in packages/document/src/editor/collab/types.ts:187
CollabStatetype#
type CollabState = 'disabled' | 'synced' | 'pending' | 'offline' | 'desynced';Defined in packages/document/src/editor/collab/types.ts:352
CollabStoredVersiontype#
type CollabStoredVersion = CollabVersionSnapshot | CollabVersionDelta;Defined in packages/document/src/editor/collab/types.ts:139
CollabWireMessagetype#
type CollabWireMessage = { type: string } & Record<string, unknown>;Defined in packages/document/src/editor/collab/types.ts:298
@birchui/document/docx#
buildDocxPartsfunction#
function buildDocxParts(input: DocumentData, options: DocxWriteOptions = {}): ZipInputFile[]| Parameter | Type | Description |
|---|---|---|
input | DocumentData | — |
optionsoptional | DocxWriteOptions | — |
Defined in packages/document/src/docx/writer.ts:1505
detectFileTypefunction#
function detectFileType(input: FileTypeInput): FileTypeInfoThe type of an embedded file. The ProgID is asked first, then the file name, then the content type and the extension of the part, and last the leading bytes.
| Parameter | Type | Description |
|---|---|---|
input | FileTypeInput | — |
Defined in packages/document/src/docx/file-type.ts:352
documentToDocxfunction#
function documentToDocx(data: DocumentData, options: DocxWriteOptions = {}): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
data | DocumentData | — |
optionsoptional | DocxWriteOptions | — |
Defined in packages/document/src/docx/writer.ts:1545
docxToDocumentfunction#
function docxToDocument(input: Uint8Array | ArrayBuffer | Blob, options: DocxReadOptions = {}): Promise<DocumentData>| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | Blob | — |
optionsoptional | DocxReadOptions | — |
Defined in packages/document/src/docx/reader.ts:774
embeddedObjectFilefunction#
function embeddedObjectFile(attrs: Attrs): EmbeddedObjectFile| Parameter | Type | Description |
|---|---|---|
attrs | Attrs | — |
Defined in packages/document/src/docx/embedded.ts:107
embeddedObjectNodefunction#
function embeddedObjectNode(input: EmbeddedObjectInput): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
input | EmbeddedObjectInput | — |
Defined in packages/document/src/docx/embedded.ts:85
embeddedObjectTypefunction#
function embeddedObjectType(attrs: Attrs): FileTypeInfoThe file type of an embedded_object node, from its ProgID, file name, content type and bytes, in that order.
| Parameter | Type | Description |
|---|---|---|
attrs | Attrs | — |
Defined in packages/document/src/docx/embedded.ts:63
fileIconSvgfunction#
function fileIconSvg(type: Pick<FileTypeInfo, 'kind' | 'badge'>, options: FileIconSvgOptions = {}): stringA standalone SVG picture of the icon of a file type, with the badge as text.
| Parameter | Type | Description |
|---|---|---|
type | Pick<FileTypeInfo, 'kind' | 'badge'> | — |
optionsoptional | FileIconSvgOptions | — |
Defined in packages/document/src/docx/file-icon.ts:143
fileTypeLabelfunction#
function fileTypeLabel(label: FileTypeLabel, translate?: FileTypeTranslate): stringThe name of a file type as it reads inside a sentence: "PDF document", "image".
| Parameter | Type | Description |
|---|---|---|
label | FileTypeLabel | — |
translateoptional | FileTypeTranslate | — |
Defined in packages/document/src/docx/file-type.ts:420
metafileToSvgfunction#
function metafileToSvg(bytes: Uint8Array, options: MetafileOptions = {}): string | null| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
optionsoptional | MetafileOptions | — |
Defined in packages/document/src/docx/metafile.ts:584
readDocxfunction#
function readDocx(input: Uint8Array | ArrayBuffer | Blob, options: DocxReadOptions = {}): Promise<DocxReadResult>| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | Blob | — |
optionsoptional | DocxReadOptions | — |
Defined in packages/document/src/docx/reader.ts:447
validateDocxPackagefunction#
function validateDocxPackage(bytes: Uint8Array | ArrayBuffer, options: { limits?: Partial<ZipLimits> } = {}): Promise<DocxValidationResult>| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | ArrayBuffer | — |
optionsoptional | { limits?: Partial<ZipLimits> } | — |
Defined in packages/document/src/docx/validate.ts:940
validateDocxPartsfunction#
function validateDocxParts(files: Map<string, Uint8Array>): DocxValidationResult| Parameter | Type | Description |
|---|---|---|
files | Map<string, Uint8Array> | — |
Defined in packages/document/src/docx/validate.ts:878
DocumentFormatErrorclass#
class DocumentFormatError extends Error
new DocumentFormatError(readonly code: DocumentFormatCode, message: string)| Member | Type | Description |
|---|---|---|
namereadonly | "DocumentFormatError" | — |
codereadonly | DocumentFormatCode | — |
Defined in packages/document/src/docx/errors.ts:42
ZipLimitErrorclass#
class ZipLimitError extends Error
new ZipLimitError(code: ZipLimitCode, message: string, detail: { limit: number; actual: number; entryName?: string })| Member | Type | Description |
|---|---|---|
codereadonly | ZipLimitCode | — |
limitreadonly | number | — |
actualreadonly | number | — |
entryNamereadonly | string | undefined | — |
Defined in packages/document/src/docx/errors.ts:23
DEFAULT_ZIP_LIMITSconst#
const DEFAULT_ZIP_LIMITS: Readonly<ZipLimits>Defined in packages/document/src/docx/errors.ts:16
DOCX_MIMEconst#
const DOCX_MIME: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'Defined in packages/document/src/docx/write-parts.ts:74
DocxImportFeatureinterface#
interface DocxImportFeatureDefined in packages/document/src/docx/report.ts:1
DocxImportReportinterface#
interface DocxImportReport| Property | Type | Description |
|---|---|---|
modelled | DocxImportFeature[] | — |
preserved | DocxImportFeature[] | — |
dropped | DocxImportFeature[] | — |
Defined in packages/document/src/docx/report.ts:7
DocxPageMapinterface#
interface DocxPageMap| Property | Type | Description |
|---|---|---|
bookmarksoptional | Readonly<Record<string, number>> | — |
headingsoptional | readonly number[] | — |
headerFooteroptional | Readonly<Partial<Record<'default' | 'first' | 'even', number>>> | — |
Defined in packages/document/src/docx/writer.ts:84
DocxReadOptionsinterface#
interface DocxReadOptions| Property | Type | Description |
|---|---|---|
limitsoptional | Partial<ZipLimits> | Caps on the archive: entry count, inflated size of one entry, total inflated size and compression ratio. |
Defined in packages/document/src/docx/reader.ts:442
DocxReadResultinterface#
interface DocxReadResult| Property | Type | Description |
|---|---|---|
document | DocumentData | — |
warnings | string[] | — |
report | DocxImportReport | — |
Defined in packages/document/src/docx/reader.ts:367
DocxValidationIssueinterface#
interface DocxValidationIssueDefined in packages/document/src/docx/validate.ts:7
DocxValidationResultinterface#
interface DocxValidationResult| Property | Type | Description |
|---|---|---|
ok | boolean | — |
issues | DocxValidationIssue[] | — |
Defined in packages/document/src/docx/validate.ts:14
DocxWriteOptionsinterface#
interface DocxWriteOptions| Property | Type | Description |
|---|---|---|
trackRevisionsoptional | boolean | — |
zoomoptional | number | — |
pageCountoptional | number | — |
pagesoptional | DocxPageMap | — |
compressoptional | boolean | — |
nowoptional | Date | — |
preserveSourceoptional | boolean | 'exact' | — |
Defined in packages/document/src/docx/writer.ts:90
EmbeddedObjectFileinterface#
interface EmbeddedObjectFileDefined in packages/document/src/docx/embedded.ts:30
EmbeddedObjectInputinterface#
interface EmbeddedObjectInput| Property | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
fileName | string | — |
mimeTypeoptional | string | — |
asIconoptional | boolean | — |
iconoptional | string | — |
widthoptional | number | — |
heightoptional | number | — |
Defined in packages/document/src/docx/embedded.ts:20
FileIconSvgOptionsinterface#
interface FileIconSvgOptionsDefined in packages/document/src/docx/file-icon.ts:136
FileTypeInfointerface#
interface FileTypeInfo| Property | Type | Description |
|---|---|---|
kind | FileKind | — |
label | FileTypeLabel | — |
extension | string | Lower-case extension without the dot; empty when nothing is known. |
badge | string | Up to four upper-case characters for the icon. |
mimeType | string | — |
source | FileTypeSource | — |
Defined in packages/document/src/docx/file-type.ts:28
FileTypeInputinterface#
interface FileTypeInput| Property | Type | Description |
|---|---|---|
progIdoptional | string | null | — |
fileNameoptional | string | null | — |
mimeTypeoptional | string | null | — |
partNameoptional | string | null | — |
dataoptional | Uint8Array | null | — |
Defined in packages/document/src/docx/file-type.ts:39
MetafileOptionsinterface#
interface MetafileOptions| Property | Type | Description |
|---|---|---|
embeddedEmfoptional | boolean | — |
Defined in packages/document/src/docx/metafile.ts:580
UnzipOptionsinterface#
interface UnzipOptionsDefined in packages/document/src/docx/errors.ts:10
ZipLimitsinterface#
interface ZipLimits| Property | Type | Description |
|---|---|---|
maxEntries | number | — |
maxEntryBytes | number | — |
maxTotalBytes | number | — |
maxRatio | number | — |
Defined in packages/document/src/docx/errors.ts:1
DocumentFormatCodetype#
type DocumentFormatCode =
'encrypted-or-legacy-doc' | 'encrypted-entry' | 'not-a-zip' | 'not-a-word-document' | 'xml-too-deep';Defined in packages/document/src/docx/errors.ts:39
FileKindtype#
type FileKind =
'word' | 'excel' | 'powerpoint' | 'pdf' | 'email' | 'image' | 'text' | 'archive' | 'media' | 'file';Defined in packages/document/src/docx/file-type.ts:5
FileTypeLabeltype#
type FileTypeLabel =
| 'word'
| 'excel'
| 'powerpoint'
| 'document'
| 'spreadsheet'
| 'presentation'
| 'pdf'
| 'outlook'
| 'email'
| 'image'
| 'text'
| 'csv'
| 'archive'
| 'audio'
| 'video'
| 'file';Defined in packages/document/src/docx/file-type.ts:8
FileTypeSourcetype#
type FileTypeSource = 'progId' | 'fileName' | 'contentType' | 'content' | 'none';Defined in packages/document/src/docx/file-type.ts:26
ZipLimitCodetype#
type ZipLimitCode = 'too-many-entries' | 'entry-too-large' | 'archive-too-large' | 'ratio-too-high';Defined in packages/document/src/docx/errors.ts:8
@birchui/document/formats#
docToDocumentfunction#
function docToDocument(input: Uint8Array | ArrayBuffer, options: DocReadOptions = {}): DocumentDataReads a Word 97–2003 binary document (.doc). Every failure is a DocFormatError; hostile
or damaged input never reads outside the file and stays within limits.
| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | — |
optionsoptional | DocReadOptions | — |
Defined in packages/document/src/doc/reader.ts:865
documentToHtmlfunction#
function documentToHtml(input: DocumentInput, options: HtmlDocumentOptions = {}): string| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | HtmlDocumentOptions | — |
Defined in packages/document/src/formats/html.ts:964
documentToMarkdownfunction#
function documentToMarkdown(input: DocumentInput, options: MarkdownOptions = {}): string| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | MarkdownOptions | — |
Defined in packages/document/src/formats/markdown.ts:261
documentToOdtfunction#
function documentToOdt(input: DocumentInput): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
Defined in packages/document/src/formats/odt.ts:452
htmlToDocumentfunction#
function htmlToDocument(html: string): DocumentData| Parameter | Type | Description |
|---|---|---|
html | string | — |
Defined in packages/document/src/formats/html.ts:690
markdownToDocumentfunction#
function markdownToDocument(markdown: string): DocumentData| Parameter | Type | Description |
|---|---|---|
markdown | string | — |
Defined in packages/document/src/formats/markdown.ts:748
odtToDocumentfunction#
function odtToDocument(input: Uint8Array | ArrayBuffer | Blob, options: { limits?: Partial<ZipLimits> } = {}): Promise<DocumentData>| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | Blob | — |
optionsoptional | { limits?: Partial<ZipLimits> } | — |
Defined in packages/document/src/formats/odt.ts:831
rtfToDocumentfunction#
function rtfToDocument(input: string | Uint8Array | ArrayBuffer): DocumentData| Parameter | Type | Description |
|---|---|---|
input | string | Uint8Array | ArrayBuffer | — |
Defined in packages/document/src/formats/rtf.ts:700
DocFormatErrorclass#
class DocFormatError extends Error
new DocFormatError(readonly code: DocFormatCode, message: string)| Member | Type | Description |
|---|---|---|
namereadonly | "DocFormatError" | — |
codereadonly | DocFormatCode | — |
Defined in packages/document/src/doc/errors.ts:4
DEFAULT_DOC_LIMITSconst#
const DEFAULT_DOC_LIMITS: Readonly<DocLimits>Defined in packages/document/src/doc/errors.ts:28
ODT_MIMEconst#
const ODT_MIME: "application/vnd.oasis.opendocument.text" = 'application/vnd.oasis.opendocument.text'Defined in packages/document/src/formats/odt.ts:26
DocLimitsinterface#
interface DocLimits| Property | Type | Description |
|---|---|---|
maxBytes | number | Largest file that is read at all, in bytes. |
maxCharacters | number | Largest number of characters in the body of the document. |
maxPictureBytes | number | Total size of the pictures that are kept, in bytes. Pictures past it are left out. |
maxTableCells | number | Largest number of cells in one table. A table past it is read as paragraphs. |
Defined in packages/document/src/doc/errors.ts:15
DocReadOptionsinterface#
interface DocReadOptionsDefined in packages/document/src/doc/reader.ts:43
HtmlDocumentOptionsinterface#
interface HtmlDocumentOptions| Property | Type | Description |
|---|---|---|
fullDocumentoptional | boolean | — |
titleoptional | string | — |
includeDeletedoptional | boolean | — |
linkSchemesoptional | readonly string[] | Schemes written as links that can be followed, besides http, https, mailto and tel. |
Defined in packages/document/src/formats/html.ts:23
MarkdownOptionsinterface#
interface MarkdownOptions| Property | Type | Description |
|---|---|---|
includeDeletedoptional | boolean | — |
Defined in packages/document/src/formats/markdown.ts:21
DocFormatCodetype#
type DocFormatCode =
'not-a-doc' | 'encrypted' | 'unsupported-version' | 'too-large' | 'too-many-characters' | 'corrupt';Defined in packages/document/src/doc/errors.ts:1
@birchui/document/headless#
acceptAllRevisionsfunction#
function acceptAllRevisions(doc: DocNodeJSON): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/compare.ts:677
breakGapsfunction#
function breakGaps(breaks: readonly LayoutBreak[], pageStride: number): number[]| Parameter | Type | Description |
|---|---|---|
breaks | readonly LayoutBreak[] | — |
pageStride | number | — |
Defined in packages/document/src/layout/paginate.ts:630
buildDocxPartsfunction#
function buildDocxParts(input: DocumentData, options: DocxWriteOptions = {}): ZipInputFile[]| Parameter | Type | Description |
|---|---|---|
input | DocumentData | — |
optionsoptional | DocxWriteOptions | — |
Defined in packages/document/src/docx/writer.ts:1505
clearRegisteredFontsfunction#
function clearRegisteredFonts(): voidDefined in packages/document/src/layout/pdf/font-substitution.ts:89
combineDocumentsfunction#
function combineDocuments(original: DocNodeJSON, first: DocNodeJSON, second: DocNodeJSON, options: CombineOptions = {}): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
original | DocNodeJSON | — |
first | DocNodeJSON | — |
second | DocNodeJSON | — |
optionsoptional | CombineOptions | — |
Defined in packages/document/src/model/combine.ts:78
compareDocumentsfunction#
function compareDocuments(original: DocNodeJSON, revised: DocNodeJSON, options: CompareOptions & { idPrefix?: string } = {}): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
original | DocNodeJSON | — |
revised | DocNodeJSON | — |
optionsoptional | CompareOptions & { idPrefix?: string } | — |
Defined in packages/document/src/model/compare.ts:593
contentBoxfunction#
function contentBox(setup: PageSetup): { width: number; height: number }| Parameter | Type | Description |
|---|---|---|
setup | PageSetup | — |
Defined in packages/document/src/model/page-setup.ts:45
countRevisionsfunction#
function countRevisions(doc: DocNodeJSON): number| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/compare.ts:656
detectFileTypefunction#
function detectFileType(input: FileTypeInput): FileTypeInfoThe type of an embedded file. The ProgID is asked first, then the file name, then the content type and the extension of the part, and last the leading bytes.
| Parameter | Type | Description |
|---|---|---|
input | FileTypeInput | — |
Defined in packages/document/src/docx/file-type.ts:352
docToDocumentfunction#
function docToDocument(input: Uint8Array | ArrayBuffer, options: DocReadOptions = {}): DocumentDataReads a Word 97–2003 binary document (.doc). Every failure is a DocFormatError; hostile
or damaged input never reads outside the file and stays within limits.
| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | — |
optionsoptional | DocReadOptions | — |
Defined in packages/document/src/doc/reader.ts:865
documentSectionsfunction#
function documentSections(data: Pick<DocumentData, 'content' | 'page'> & Partial<DocumentData>): DocumentSection[]| Parameter | Type | Description |
|---|---|---|
data | Pick<DocumentData, 'content' | 'page'> & Partial<DocumentData> | — |
Defined in packages/document/src/model/sections.ts:10
documentTextfunction#
function documentText(doc: DocNodeJSON, options: { skipDeleted?: boolean } = {}): string| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
optionsoptional | { skipDeleted?: boolean } | — |
Defined in packages/document/src/model/json.ts:257
documentToDocxfunction#
function documentToDocx(data: DocumentData, options: DocxWriteOptions = {}): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
data | DocumentData | — |
optionsoptional | DocxWriteOptions | — |
Defined in packages/document/src/docx/writer.ts:1545
documentToHtmlfunction#
function documentToHtml(input: DocumentInput, options: HtmlDocumentOptions = {}): string| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | HtmlDocumentOptions | — |
Defined in packages/document/src/formats/html.ts:964
documentToMarkdownfunction#
function documentToMarkdown(input: DocumentInput, options: MarkdownOptions = {}): string| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | MarkdownOptions | — |
Defined in packages/document/src/formats/markdown.ts:261
documentToOdtfunction#
function documentToOdt(input: DocumentInput): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
Defined in packages/document/src/formats/odt.ts:452
documentToPdffunction#
function documentToPdf(input: DocumentInput, options: DocumentPdfOptions = {}): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | DocumentPdfOptions | — |
Defined in packages/document/src/layout/pdf/document-layout.ts:471
docxToDocumentfunction#
function docxToDocument(input: Uint8Array | ArrayBuffer | Blob, options: DocxReadOptions = {}): Promise<DocumentData>| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | Blob | — |
optionsoptional | DocxReadOptions | — |
Defined in packages/document/src/docx/reader.ts:774
embeddedObjectFilefunction#
function embeddedObjectFile(attrs: Attrs): EmbeddedObjectFile| Parameter | Type | Description |
|---|---|---|
attrs | Attrs | — |
Defined in packages/document/src/docx/embedded.ts:107
embeddedObjectNodefunction#
function embeddedObjectNode(input: EmbeddedObjectInput): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
input | EmbeddedObjectInput | — |
Defined in packages/document/src/docx/embedded.ts:85
embeddedObjectTypefunction#
function embeddedObjectType(attrs: Attrs): FileTypeInfoThe file type of an embedded_object node, from its ProgID, file name, content type and bytes, in that order.
| Parameter | Type | Description |
|---|---|---|
attrs | Attrs | — |
Defined in packages/document/src/docx/embedded.ts:63
emptyDocumentfunction#
function emptyDocument(): DocumentDataDefined in packages/document/src/model/json.ts:37
fileIconSvgfunction#
function fileIconSvg(type: Pick<FileTypeInfo, 'kind' | 'badge'>, options: FileIconSvgOptions = {}): stringA standalone SVG picture of the icon of a file type, with the badge as text.
| Parameter | Type | Description |
|---|---|---|
type | Pick<FileTypeInfo, 'kind' | 'badge'> | — |
optionsoptional | FileIconSvgOptions | — |
Defined in packages/document/src/docx/file-icon.ts:143
fileTypeLabelfunction#
function fileTypeLabel(label: FileTypeLabel, translate?: FileTypeTranslate): stringThe name of a file type as it reads inside a sentence: "PDF document", "image".
| Parameter | Type | Description |
|---|---|---|
label | FileTypeLabel | — |
translateoptional | FileTypeTranslate | — |
Defined in packages/document/src/docx/file-type.ts:420
findMatchesfunction#
function findMatches(blocks: readonly SearchBlock[], query: string, options: FindOptions = {}): SearchMatch[]| Parameter | Type | Description |
|---|---|---|
blocks | readonly SearchBlock[] | — |
query | string | — |
optionsoptional | FindOptions | — |
Defined in packages/document/src/model/search.ts:96
fontFamilyStackfunction#
function fontFamilyStack(fontFamily: string): stringA CSS font-family list that puts the metric-compatible substitutes right after each requested family.
| Parameter | Type | Description |
|---|---|---|
fontFamily | string | — |
Defined in packages/document/src/layout/pdf/font-substitution.ts:48
fontSubstitutesfunction#
function fontSubstitutes(family: string): readonly string[]| Parameter | Type | Description |
|---|---|---|
family | string | — |
Defined in packages/document/src/layout/pdf/font-substitution.ts:36
formatDatePicturefunction#
function formatDatePicture(date: Date, picture: string): string| Parameter | Type | Description |
|---|---|---|
date | Date | — |
picture | string | — |
Defined in packages/document/src/model/fields.ts:186
formatNumberfunction#
function formatNumber(value: number, format: string): string| Parameter | Type | Description |
|---|---|---|
value | number | — |
format | string | — |
Defined in packages/document/src/model/numbering.ts:239
htmlToDocumentfunction#
function htmlToDocument(html: string): DocumentData| Parameter | Type | Description |
|---|---|---|
html | string | — |
Defined in packages/document/src/formats/html.ts:690
imageSourceKindfunction#
function imageSourceKind(value: unknown): ImageSourceKind| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/document/src/model/url.ts:79
layoutDocumentfunction#
function layoutDocument(input: DocumentInput, options: DocumentPdfOptions = {}): { layout: PdfDocumentLayout; warnings: string[]; missingFonts: string[] }| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | DocumentPdfOptions | — |
Defined in packages/document/src/layout/pdf/document-layout.ts:105
layoutToPdffunction#
function layoutToPdf(layout: PdfDocumentLayout, options: PdfWriteOptions = {}): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
layout | PdfDocumentLayout | — |
optionsoptional | PdfWriteOptions | — |
Defined in packages/document/src/layout/pdf/writer.ts:722
markdownToDocumentfunction#
function markdownToDocument(markdown: string): DocumentData| Parameter | Type | Description |
|---|---|---|
markdown | string | — |
Defined in packages/document/src/formats/markdown.ts:748
markMovesfunction#
function markMoves(doc: DocNodeJSON): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/compare.ts:652
mergeContentfunction#
function mergeContent(doc: DocNodeJSON, values: MergeValues, options: MergeOptions = {}): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
values | MergeValues | — |
optionsoptional | MergeOptions | — |
Defined in packages/document/src/model/merge.ts:520
mergeDocumentfunction#
function mergeDocument(data: DocumentData, values: MergeValues, options: MergeOptions = {}): DocumentData| Parameter | Type | Description |
|---|---|---|
data | DocumentData | — |
values | MergeValues | — |
optionsoptional | MergeOptions | — |
Defined in packages/document/src/model/merge.ts:525
mergeFieldNamesfunction#
function mergeFieldNames(doc: DocNodeJSON): string[]| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/merge.ts:537
metafileToSvgfunction#
function metafileToSvg(bytes: Uint8Array, options: MetafileOptions = {}): string | null| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
optionsoptional | MetafileOptions | — |
Defined in packages/document/src/docx/metafile.ts:584
multiplyMatrixfunction#
function multiplyMatrix(first: PdfMatrix, second: PdfMatrix): PdfMatrixDefined in packages/document/src/layout/pdf/layout-tree.ts:204
normalizeDocumentfunction#
function normalizeDocument(input: DocumentInput | null | undefined): DocumentData| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | null | undefined | — |
Defined in packages/document/src/model/json.ts:155
normalizePageSetupfunction#
function normalizePageSetup(input: Partial<PageSetup> | undefined, base: PageSetup = DEFAULT_PAGE_SETUP): PageSetupDefined in packages/document/src/model/page-setup.ts:109
numberingLabelsfunction#
function numberingLabels(document: Pick<DocumentData, 'content'> & Partial<DocumentData>): NumberingLabel[]| Parameter | Type | Description |
|---|---|---|
document | Pick<DocumentData, 'content'> & Partial<DocumentData> | — |
Defined in packages/document/src/model/numbering.ts:639
odtToDocumentfunction#
function odtToDocument(input: Uint8Array | ArrayBuffer | Blob, options: { limits?: Partial<ZipLimits> } = {}): Promise<DocumentData>| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | Blob | — |
optionsoptional | { limits?: Partial<ZipLimits> } | — |
Defined in packages/document/src/formats/odt.ts:831
outlineOffunction#
function outlineOf(doc: DocNodeJSON): OutlineEntry[]| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/json.ts:307
pageDimensionsfunction#
function pageDimensions(setup: PageSetup): { width: number; height: number }| Parameter | Type | Description |
|---|---|---|
setup | PageSetup | — |
Defined in packages/document/src/model/page-setup.ts:38
paginatefunction#
function paginate(blocks: readonly LayoutBlock[], options: PaginateOptions): PaginationResult| Parameter | Type | Description |
|---|---|---|
blocks | readonly LayoutBlock[] | — |
options | PaginateOptions | — |
Defined in packages/document/src/layout/paginate.ts:617
parseFieldInstructionfunction#
function parseFieldInstruction(instruction: string): ParsedField| Parameter | Type | Description |
|---|---|---|
instruction | string | — |
Defined in packages/document/src/model/fields.ts:122
readDocxfunction#
function readDocx(input: Uint8Array | ArrayBuffer | Blob, options: DocxReadOptions = {}): Promise<DocxReadResult>| Parameter | Type | Description |
|---|---|---|
input | Uint8Array | ArrayBuffer | Blob | — |
optionsoptional | DocxReadOptions | — |
Defined in packages/document/src/docx/reader.ts:447
registeredFontsfunction#
function registeredFonts(): readonly PdfFontSource[]Defined in packages/document/src/layout/pdf/font-substitution.ts:85
registerFontsfunction#
function registerFonts(fonts: readonly PdfFontSource[]): voidMakes font files available to every PDF written afterwards, in the browser and on a server, in addition to the
fonts passed with a single call. Registering a face again replaces it.
| Parameter | Type | Description |
|---|---|---|
fonts | readonly PdfFontSource[] | — |
Defined in packages/document/src/layout/pdf/font-substitution.ts:70
rejectAllRevisionsfunction#
function rejectAllRevisions(doc: DocNodeJSON): DocNodeJSON| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/compare.ts:681
renderDocumentPdffunction#
function renderDocumentPdf(input: DocumentInput, options: DocumentPdfOptions = {}): Promise<DocumentPdfResult>| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | DocumentPdfOptions | — |
Defined in packages/document/src/layout/pdf/document-layout.ts:457
rotationMatrixfunction#
function rotationMatrix(degrees: number, centerX: number, centerY: number): PdfMatrix| Parameter | Type | Description |
|---|---|---|
degrees | number | — |
centerX | number | — |
centerY | number | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:197
rtfToDocumentfunction#
function rtfToDocument(input: string | Uint8Array | ArrayBuffer): DocumentData| Parameter | Type | Description |
|---|---|---|
input | string | Uint8Array | ArrayBuffer | — |
Defined in packages/document/src/formats/rtf.ts:700
sanitizeHreffunction#
function sanitizeHref(value: unknown, linkSchemes?: readonly string[]): string | nullThe address when it may be followed, otherwise null. linkSchemes extends the allow-list.
| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
linkSchemesoptional | readonly string[] | — |
Defined in packages/document/src/model/url.ts:56
sanitizeImageSrcfunction#
function sanitizeImageSrc(value: unknown): string| Parameter | Type | Description |
|---|---|---|
value | unknown | — |
Defined in packages/document/src/model/url.ts:92
updateFieldsfunction#
function updateFields(input: DocumentData, context: FieldContext = {}): DocumentData| Parameter | Type | Description |
|---|---|---|
input | DocumentData | — |
contextoptional | FieldContext | — |
Defined in packages/document/src/model/fields.ts:419
validateDocxPackagefunction#
function validateDocxPackage(bytes: Uint8Array | ArrayBuffer, options: { limits?: Partial<ZipLimits> } = {}): Promise<DocxValidationResult>| Parameter | Type | Description |
|---|---|---|
bytes | Uint8Array | ArrayBuffer | — |
optionsoptional | { limits?: Partial<ZipLimits> } | — |
Defined in packages/document/src/docx/validate.ts:940
validateDocxPartsfunction#
function validateDocxParts(files: Map<string, Uint8Array>): DocxValidationResult| Parameter | Type | Description |
|---|---|---|
files | Map<string, Uint8Array> | — |
Defined in packages/document/src/docx/validate.ts:878
wordCountfunction#
function wordCount(doc: DocNodeJSON): WordCount| Parameter | Type | Description |
|---|---|---|
doc | DocNodeJSON | — |
Defined in packages/document/src/model/json.ts:274
writePdffunction#
function writePdf(layout: PdfDocumentLayout, options: PdfWriteOptions = {}): Promise<PdfWriteResult>| Parameter | Type | Description |
|---|---|---|
layout | PdfDocumentLayout | — |
optionsoptional | PdfWriteOptions | — |
Defined in packages/document/src/layout/pdf/writer.ts:613
DocFormatErrorclass#
class DocFormatError extends Error
new DocFormatError(readonly code: DocFormatCode, message: string)| Member | Type | Description |
|---|---|---|
namereadonly | "DocFormatError" | — |
codereadonly | DocFormatCode | — |
Defined in packages/document/src/doc/errors.ts:4
DocumentFormatErrorclass#
class DocumentFormatError extends Error
new DocumentFormatError(readonly code: DocumentFormatCode, message: string)| Member | Type | Description |
|---|---|---|
namereadonly | "DocumentFormatError" | — |
codereadonly | DocumentFormatCode | — |
Defined in packages/document/src/docx/errors.ts:42
PdfFontErrorclass#
class PdfFontError extends Error
new PdfFontError(readonly families: readonly string[])Defined in packages/document/src/layout/pdf/font-substitution.ts:97
ZipLimitErrorclass#
class ZipLimitError extends Error
new ZipLimitError(code: ZipLimitCode, message: string, detail: { limit: number; actual: number; entryName?: string })| Member | Type | Description |
|---|---|---|
codereadonly | ZipLimitCode | — |
limitreadonly | number | — |
actualreadonly | number | — |
entryNamereadonly | string | undefined | — |
Defined in packages/document/src/docx/errors.ts:23
DEFAULT_DOC_LIMITSconst#
const DEFAULT_DOC_LIMITS: Readonly<DocLimits>Defined in packages/document/src/doc/errors.ts:28
DEFAULT_PAGE_SETUPconst#
const DEFAULT_PAGE_SETUP: PageSetupDefined in packages/document/src/model/page-setup.ts:17
DEFAULT_ZIP_LIMITSconst#
const DEFAULT_ZIP_LIMITS: Readonly<ZipLimits>Defined in packages/document/src/docx/errors.ts:16
DOCX_MIMEconst#
const DOCX_MIME: "application/vnd.openxmlformats-officedocument.wordprocessingml.document" = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'Defined in packages/document/src/docx/write-parts.ts:74
FONT_SUBSTITUTIONSconst#
const FONT_SUBSTITUTIONS: Readonly<Record<string, readonly string[]>>Fonts with the same advance widths as the font they replace, so text set in the substitute breaks at the same places. Carlito and Caladea match Calibri and Cambria; the Liberation and Croscore families match Arial, Times New Roman and Courier New; Gelasio matches Georgia and Selawik matches Segoe UI.
Defined in packages/document/src/layout/pdf/font-substitution.ts:8
ODT_MIMEconst#
const ODT_MIME: "application/vnd.oasis.opendocument.text" = 'application/vnd.oasis.opendocument.text'Defined in packages/document/src/formats/odt.ts:26
PAGE_SIZESconst#
const PAGE_SIZES: Readonly<Record<PageSizeName, { width: number; height: number }>>Defined in packages/document/src/model/page-setup.ts:3
PARAGRAPH_STYLESconst#
const PARAGRAPH_STYLES: readonly ParagraphStyleDefinition[]Defined in packages/document/src/model/paragraph-styles.ts:24
AbstractNumberinginterface#
interface AbstractNumbering| Property | Type | Description |
|---|---|---|
id | number | — |
nameoptional | string | — |
multiLevelTypeoptional | string | — |
styleLinkoptional | string | — |
numStyleLinkoptional | string | — |
levels | NumberingLevel[] | — |
Defined in packages/document/src/model/numbering.ts:31
CombineOptionsinterface#
interface CombineOptions extends Pick<CompareOptions, 'date' | 'granularity' | 'formatting'>| Property | Type | Description |
|---|---|---|
firstAuthoroptional | string | — |
secondAuthoroptional | string | — |
movesoptional | boolean | — |
dateoptional | string | undefined | Inherited from CompareOptions. |
granularityoptional | "word" | "character" | undefined | Inherited from CompareOptions. |
formattingoptional | boolean | undefined | Inherited from CompareOptions. |
Defined in packages/document/src/model/combine.ts:5
DocLimitsinterface#
interface DocLimits| Property | Type | Description |
|---|---|---|
maxBytes | number | Largest file that is read at all, in bytes. |
maxCharacters | number | Largest number of characters in the body of the document. |
maxPictureBytes | number | Total size of the pictures that are kept, in bytes. Pictures past it are left out. |
maxTableCells | number | Largest number of cells in one table. A table past it is read as paragraphs. |
Defined in packages/document/src/doc/errors.ts:15
DocMarkJSONinterface#
interface DocMarkJSONDefined in packages/document/src/types.ts:29
DocNodeJSONinterface#
interface DocNodeJSON| Property | Type | Description |
|---|---|---|
type | string | — |
attrsoptional | Record<string, unknown> | — |
contentoptional | DocNodeJSON[] | — |
marksoptional | DocMarkJSON[] | — |
textoptional | string | — |
Defined in packages/document/src/types.ts:34
DocReadOptionsinterface#
interface DocReadOptionsDefined in packages/document/src/doc/reader.ts:43
DocumentDatainterface#
interface DocumentData extends HeaderFooterContent| Property | Type | Description |
|---|---|---|
version | 1 | — |
content | DocNodeJSON | — |
page | PageSetup | — |
comments | CommentThread[] | — |
properties | DocumentProperties | — |
defaults | DocumentDefaults | — |
evenHeaderoptional | DocNodeJSON | null | — |
evenFooteroptional | DocNodeJSON | null | — |
settingsoptional | DocumentSettings | — |
stylesoptional | DocumentStyle[] | — |
numberingoptional | NumberingDefinitions | — |
protectionoptional | DocumentProtection | null | — |
peopleoptional | DocumentPerson[] | — |
docxoptional | DocxPackage | null | — |
watermarkoptional | Watermark | null | — |
lineNumbersoptional | LineNumbering | null | — |
listsoptional | MultilevelListDefinition[] | — |
sourcesoptional | BibliographySource[] | — |
citationStyleoptional | CitationStyle | — |
header | DocNodeJSON | null | Inherited from HeaderFooterContent. |
footer | DocNodeJSON | null | Inherited from HeaderFooterContent. |
firstHeader | DocNodeJSON | null | Inherited from HeaderFooterContent. |
firstFooter | DocNodeJSON | null | Inherited from HeaderFooterContent. |
Defined in packages/document/src/types.ts:522
DocumentPdfOptionsinterface#
interface DocumentPdfOptions extends PdfWriteOptions| Property | Type | Description |
|---|---|---|
fontsoptional | readonly PdfFontSource[] | — |
titleoptional | string | — |
authoroptional | string | — |
subjectoptional | string | — |
keywordsoptional | string | — |
languageoptional | string | — |
outlineoptional | boolean | — |
compressoptional | boolean | undefined | Inherited from PdfWriteOptions. |
creationDateoptional | Date | undefined | Inherited from PdfWriteOptions. |
produceroptional | string | undefined | Inherited from PdfWriteOptions. |
pdfAoptional | boolean | undefined | Inherited from PdfWriteOptions. |
taggedoptional | boolean | undefined | Inherited from PdfWriteOptions. |
Defined in packages/document/src/layout/pdf/document-layout.ts:28
DocumentPdfResultinterface#
interface DocumentPdfResult| Property | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
warnings | string[] | — |
pageCount | number | — |
missingFonts | string[] | Font families the document asks for that had no font file and no metric-compatible substitute. |
Defined in packages/document/src/layout/pdf/document-layout.ts:38
DocumentPropertiesinterface#
interface DocumentProperties| Property | Type | Description |
|---|---|---|
titleoptional | string | — |
subjectoptional | string | — |
authoroptional | string | — |
keywordsoptional | string | — |
descriptionoptional | string | — |
createdoptional | string | — |
modifiedoptional | string | — |
categoryoptional | string | — |
lastModifiedByoptional | string | — |
revisionoptional | string | — |
companyoptional | string | — |
manageroptional | string | — |
customoptional | Record<string, string | number | boolean> | — |
Defined in packages/document/src/types.ts:158
DocumentSettingsinterface#
interface DocumentSettings| Property | Type | Description |
|---|---|---|
evenAndOddHeadersoptional | boolean | — |
mirrorMarginsoptional | boolean | — |
trackRevisionsoptional | boolean | — |
defaultTabStopoptional | number | — |
protectionoptional | DocumentProtection | null | — |
footnotesoptional | NoteSettings | — |
endnotesoptional | NoteSettings | — |
compatibilityModeoptional | number | — |
compatoptional | CompatibilitySettings | — |
kerningoptional | boolean | False when the document's default text has Word's "Kerning for fonts" switched off, which is the case for most Word documents. Text is then laid out without pair kerning, as Word does, unless a run switches it on. |
Defined in packages/document/src/types.ts:194
DocumentStyleinterface#
interface DocumentStyle| Property | Type | Description |
|---|---|---|
id | string | — |
name | string | — |
type | DocumentStyleType | — |
basedOnoptional | string | — |
nextoptional | string | — |
linkoptional | string | — |
isDefaultoptional | boolean | — |
isQuickStyleoptional | boolean | — |
builtinoptional | ParagraphStyleId | — |
outlineLeveloptional | number | — |
numberingoptional | { numId: number; level: number } | — |
paragraphoptional | Record<string, unknown> | — |
runoptional | Record<string, unknown> | — |
tableoptional | Record<string, unknown> | — |
Defined in packages/document/src/types.ts:213
DocxImportFeatureinterface#
interface DocxImportFeatureDefined in packages/document/src/docx/report.ts:1
DocxImportReportinterface#
interface DocxImportReport| Property | Type | Description |
|---|---|---|
modelled | DocxImportFeature[] | — |
preserved | DocxImportFeature[] | — |
dropped | DocxImportFeature[] | — |
Defined in packages/document/src/docx/report.ts:7
DocxPageMapinterface#
interface DocxPageMap| Property | Type | Description |
|---|---|---|
bookmarksoptional | Readonly<Record<string, number>> | — |
headingsoptional | readonly number[] | — |
headerFooteroptional | Readonly<Partial<Record<'default' | 'first' | 'even', number>>> | — |
Defined in packages/document/src/docx/writer.ts:84
DocxReadOptionsinterface#
interface DocxReadOptions| Property | Type | Description |
|---|---|---|
limitsoptional | Partial<ZipLimits> | Caps on the archive: entry count, inflated size of one entry, total inflated size and compression ratio. |
Defined in packages/document/src/docx/reader.ts:442
DocxReadResultinterface#
interface DocxReadResult| Property | Type | Description |
|---|---|---|
document | DocumentData | — |
warnings | string[] | — |
report | DocxImportReport | — |
Defined in packages/document/src/docx/reader.ts:367
DocxValidationIssueinterface#
interface DocxValidationIssueDefined in packages/document/src/docx/validate.ts:7
DocxValidationResultinterface#
interface DocxValidationResult| Property | Type | Description |
|---|---|---|
ok | boolean | — |
issues | DocxValidationIssue[] | — |
Defined in packages/document/src/docx/validate.ts:14
DocxWriteOptionsinterface#
interface DocxWriteOptions| Property | Type | Description |
|---|---|---|
trackRevisionsoptional | boolean | — |
zoomoptional | number | — |
pageCountoptional | number | — |
pagesoptional | DocxPageMap | — |
compressoptional | boolean | — |
nowoptional | Date | — |
preserveSourceoptional | boolean | 'exact' | — |
Defined in packages/document/src/docx/writer.ts:90
EmbeddedObjectFileinterface#
interface EmbeddedObjectFileDefined in packages/document/src/docx/embedded.ts:30
EmbeddedObjectInputinterface#
interface EmbeddedObjectInput| Property | Type | Description |
|---|---|---|
data | Uint8Array | ArrayBuffer | — |
fileName | string | — |
mimeTypeoptional | string | — |
asIconoptional | boolean | — |
iconoptional | string | — |
widthoptional | number | — |
heightoptional | number | — |
Defined in packages/document/src/docx/embedded.ts:20
FieldContextinterface#
interface FieldContext| Property | Type | Description |
|---|---|---|
nowoptional | Date | — |
valuesoptional | Record<string, unknown> | — |
pagesoptional | Record<string, number> | — |
pageCountoptional | number | — |
Defined in packages/document/src/model/fields.ts:37
FileIconSvgOptionsinterface#
interface FileIconSvgOptionsDefined in packages/document/src/docx/file-icon.ts:136
FileTypeInfointerface#
interface FileTypeInfo| Property | Type | Description |
|---|---|---|
kind | FileKind | — |
label | FileTypeLabel | — |
extension | string | Lower-case extension without the dot; empty when nothing is known. |
badge | string | Up to four upper-case characters for the icon. |
mimeType | string | — |
source | FileTypeSource | — |
Defined in packages/document/src/docx/file-type.ts:28
FileTypeInputinterface#
interface FileTypeInput| Property | Type | Description |
|---|---|---|
progIdoptional | string | null | — |
fileNameoptional | string | null | — |
mimeTypeoptional | string | null | — |
partNameoptional | string | null | — |
dataoptional | Uint8Array | null | — |
Defined in packages/document/src/docx/file-type.ts:39
HtmlDocumentOptionsinterface#
interface HtmlDocumentOptions| Property | Type | Description |
|---|---|---|
fullDocumentoptional | boolean | — |
titleoptional | string | — |
includeDeletedoptional | boolean | — |
linkSchemesoptional | readonly string[] | Schemes written as links that can be followed, besides http, https, mailto and tel. |
Defined in packages/document/src/formats/html.ts:23
MarkdownOptionsinterface#
interface MarkdownOptions| Property | Type | Description |
|---|---|---|
includeDeletedoptional | boolean | — |
Defined in packages/document/src/formats/markdown.ts:21
MergeOptionsinterface#
interface MergeOptions| Property | Type | Description |
|---|---|---|
missingoptional | 'empty' | 'keep' | 'placeholder' | — |
localeoptional | string | — |
currencyoptional | string | — |
Defined in packages/document/src/types.ts:643
MetafileOptionsinterface#
interface MetafileOptions| Property | Type | Description |
|---|---|---|
embeddedEmfoptional | boolean | — |
Defined in packages/document/src/docx/metafile.ts:580
NumberingDefinitionsinterface#
interface NumberingDefinitions| Property | Type | Description |
|---|---|---|
abstracts | AbstractNumbering[] | — |
instances | NumberingInstance[] | — |
Defined in packages/document/src/model/numbering.ts:52
NumberingInstanceinterface#
interface NumberingInstance| Property | Type | Description |
|---|---|---|
id | number | — |
abstractId | number | — |
overridesoptional | NumberingOverride[] | — |
Defined in packages/document/src/model/numbering.ts:46
NumberingLabelinterface#
interface NumberingLabel| Property | Type | Description |
|---|---|---|
path | number[] | — |
label | string | — |
level | number | — |
numId | number | null | — |
format | string | — |
suffix | 'tab' | 'space' | 'nothing' | — |
text | string | — |
Defined in packages/document/src/model/numbering.ts:57
NumberingLevelinterface#
interface NumberingLevel| Property | Type | Description |
|---|---|---|
level | number | — |
start | number | — |
format | string | — |
text | string | — |
suffixoptional | 'tab' | 'space' | 'nothing' | — |
restartoptional | number | — |
paragraphStyleoptional | string | — |
isLegaloptional | boolean | — |
alignoptional | string | — |
indentLeftoptional | number | — |
hangingoptional | number | — |
fontoptional | string | — |
runoptional | NumberingRun | — |
Defined in packages/document/src/model/numbering.ts:15
NumberingOverrideinterface#
interface NumberingOverride| Property | Type | Description |
|---|---|---|
level | number | — |
startoptional | number | — |
definitionoptional | NumberingLevel | — |
Defined in packages/document/src/model/numbering.ts:40
PageSetupinterface#
interface PageSetup| Property | Type | Description |
|---|---|---|
size | PageSizeName | { width: number; height: number } | — |
orientation | PageOrientation | — |
margins | PageMargins | — |
headerDistance | number | — |
footerDistance | number | — |
differentFirstPage | boolean | — |
gutteroptional | number | — |
columnsoptional | SectionColumns | null | — |
sectionTypeoptional | SectionBreakType | null | — |
pageNumbersoptional | PageNumbering | null | — |
verticalAlignoptional | 'top' | 'center' | 'bottom' | 'justify' | null | — |
rtloptional | boolean | — |
lineNumbersoptional | LineNumbering | null | — |
pageBordersoptional | PageBorders | null | — |
docxoptional | PreservedXml | null | — |
changeoptional | SectionFormatChange | null | — |
Defined in packages/document/src/types.ts:52
ParagraphStyleDefinitioninterface#
interface ParagraphStyleDefinition| Property | Type | Description |
|---|---|---|
id | ParagraphStyleId | — |
wordName | string | — |
label | string | — |
tag | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'blockquote' | 'pre' | — |
fontSizeoptional | number | — |
fontFamilyoptional | string | — |
boldoptional | boolean | — |
italicoptional | boolean | — |
coloroptional | string | — |
spaceBeforeoptional | number | — |
spaceAfteroptional | number | — |
lineHeightoptional | number | — |
alignoptional | TextAlignment | — |
indentLeftoptional | number | — |
indentRightoptional | number | — |
outlineLeveloptional | number | — |
keepWithNextoptional | boolean | — |
shadingoptional | string | — |
Defined in packages/document/src/model/paragraph-styles.ts:3
ParsedFieldinterface#
interface ParsedField| Property | Type | Description |
|---|---|---|
keyword | string | — |
kind | FieldKind | 'link' | — |
name | string | — |
args | string[] | — |
switches | Record<string, string | true> | — |
href | string | null | — |
title | string | null | — |
canonical | string | — |
placeholder | string | null | — |
Defined in packages/document/src/model/fields.ts:25
PdfClusterinterface#
interface PdfClusterDefined in packages/document/src/layout/pdf/layout-tree.ts:47
PdfColorinterface#
interface PdfColorDefined in packages/document/src/layout/pdf/layout-tree.ts:1
PdfDestinationinterface#
interface PdfDestinationDefined in packages/document/src/layout/pdf/layout-tree.ts:144
PdfDocumentLayoutinterface#
interface PdfDocumentLayout| Property | Type | Description |
|---|---|---|
pages | PdfPage[] | — |
outlineoptional | PdfOutlineEntry[] | — |
titleoptional | string | — |
authoroptional | string | — |
subjectoptional | string | — |
keywordsoptional | string | — |
languageoptional | string | — |
fontsoptional | readonly PdfFontSource[] | — |
structureoptional | readonly PdfStructNode[] | — |
pdfAoptional | boolean | — |
createdoptional | Date | — |
modifiedoptional | Date | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:182
PdfFontSourceinterface#
interface PdfFontSourceDefined in packages/document/src/layout/pdf/layout-tree.ts:175
PdfGroupinterface#
interface PdfGroup extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'group' | — |
items | PdfItem[] | — |
matrixoptional | PdfMatrix | — |
clipoptional | { x: number; y: number; width: number; height: number } | — |
opacityoptional | number | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:152
PdfImageinterface#
interface PdfImage extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'image' | — |
x | number | — |
y | number | — |
width | number | — |
height | number | — |
data | Uint8Array | — |
mime | 'image/jpeg' | 'image/png' | — |
altoptional | string | — |
rotationoptional | number | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:121
PdfLineinterface#
interface PdfLine extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'line' | — |
x1 | number | — |
y1 | number | — |
x2 | number | — |
y2 | number | — |
coloroptional | PdfColor | — |
widthoptional | number | — |
dashoptional | readonly number[] | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:93
PdfLinkAreainterface#
interface PdfLinkArea| Property | Type | Description |
|---|---|---|
kind | 'link' | — |
x | number | — |
y | number | — |
width | number | — |
height | number | — |
hrefoptional | string | — |
destinationoptional | string | — |
structoptional | number | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:133
PdfOutlineEntryinterface#
interface PdfOutlineEntryDefined in packages/document/src/layout/pdf/layout-tree.ts:168
PdfPageinterface#
interface PdfPageDefined in packages/document/src/layout/pdf/layout-tree.ts:162
PdfPathinterface#
interface PdfPath extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'path' | — |
commands | readonly PdfPathCommand[] | — |
filloptional | PdfColor | — |
strokeoptional | PdfColor | — |
strokeWidthoptional | number | — |
dashoptional | readonly number[] | — |
roundCapsoptional | boolean | — |
roundJoinsoptional | boolean | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:110
PdfRectinterface#
interface PdfRect extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'rect' | — |
x | number | — |
y | number | — |
width | number | — |
height | number | — |
filloptional | PdfColor | — |
strokeoptional | PdfColor | — |
strokeWidthoptional | number | — |
dashoptional | readonly number[] | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:81
PdfStructNodeinterface#
interface PdfStructNode| Property | Type | Description |
|---|---|---|
type | PdfStructType | — |
parent | number | — |
altoptional | string | — |
languageoptional | string | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:35
PdfTagginginterface#
interface PdfTagging| Property | Type | Description |
|---|---|---|
structoptional | number | — |
artifactoptional | PdfArtifactType | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:42
PdfTextRuninterface#
interface PdfTextRun extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'text' | — |
x | number | — |
baseline | number | — |
width | number | — |
text | string | — |
fontFamily | string | — |
fontSize | number | — |
boldoptional | boolean | — |
italicoptional | boolean | — |
coloroptional | PdfColor | — |
underlineoptional | boolean | — |
underlineStyleoptional | PdfUnderlineStyle | The line drawn for underline; a single line when left out. |
underlineColoroptional | PdfColor | The colour of the underline; the colour of the text when left out. |
strikeoptional | boolean | — |
doubleStrikeoptional | boolean | — |
backgroundoptional | PdfColor | — |
linkoptional | string | — |
directionoptional | 'ltr' | 'rtl' | — |
clustersoptional | readonly PdfCluster[] | — |
trailingSpaceoptional | boolean | — |
decorationoptional | { x: number; width: number } | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:55
PdfWriteOptionsinterface#
interface PdfWriteOptions| Property | Type | Description |
|---|---|---|
compressoptional | boolean | — |
creationDateoptional | Date | — |
produceroptional | string | — |
pdfAoptional | boolean | — |
taggedoptional | boolean | — |
Defined in packages/document/src/layout/pdf/writer.ts:29
PdfWriteResultinterface#
interface PdfWriteResultDefined in packages/document/src/layout/pdf/writer.ts:37
SearchBlockinterface#
interface SearchBlockDefined in packages/document/src/model/search.ts:3
SearchMatchinterface#
interface SearchMatchDefined in packages/document/src/model/search.ts:8
UnzipOptionsinterface#
interface UnzipOptionsDefined in packages/document/src/docx/errors.ts:10
ZipLimitsinterface#
interface ZipLimits| Property | Type | Description |
|---|---|---|
maxEntries | number | — |
maxEntryBytes | number | — |
maxTotalBytes | number | — |
maxRatio | number | — |
Defined in packages/document/src/docx/errors.ts:1
DocFormatCodetype#
type DocFormatCode =
'not-a-doc' | 'encrypted' | 'unsupported-version' | 'too-large' | 'too-many-characters' | 'corrupt';Defined in packages/document/src/doc/errors.ts:1
DocumentFormatCodetype#
type DocumentFormatCode =
'encrypted-or-legacy-doc' | 'encrypted-entry' | 'not-a-zip' | 'not-a-word-document' | 'xml-too-deep';Defined in packages/document/src/docx/errors.ts:39
DocumentInputtype#
type DocumentInput = Partial<DocumentData> | DocNodeJSON;Defined in packages/document/src/types.ts:544
FieldKindtype#
type FieldKind =
| 'merge'
| 'page'
| 'pages'
| 'date'
| 'time'
| 'ref'
| 'pageref'
| 'noteref'
| 'seq'
| 'if'
| 'toc'
| 'styleref'
| 'property'
| 'form'
| 'citation'
| 'bibliography'
| 'other';Defined in packages/document/src/model/fields.ts:6
FileKindtype#
type FileKind =
'word' | 'excel' | 'powerpoint' | 'pdf' | 'email' | 'image' | 'text' | 'archive' | 'media' | 'file';Defined in packages/document/src/docx/file-type.ts:5
FileTypeLabeltype#
type FileTypeLabel =
| 'word'
| 'excel'
| 'powerpoint'
| 'document'
| 'spreadsheet'
| 'presentation'
| 'pdf'
| 'outlook'
| 'email'
| 'image'
| 'text'
| 'csv'
| 'archive'
| 'audio'
| 'video'
| 'file';Defined in packages/document/src/docx/file-type.ts:8
FileTypeSourcetype#
type FileTypeSource = 'progId' | 'fileName' | 'contentType' | 'content' | 'none';Defined in packages/document/src/docx/file-type.ts:26
ImageSourceKindtype#
type ImageSourceKind = 'embedded' | 'remote' | 'none';Defined in packages/document/src/model/url.ts:7
MergeValuestype#
type MergeValues = Record<string, unknown>;Defined in packages/document/src/types.ts:641
PdfArtifactTypetype#
type PdfArtifactType = 'header' | 'footer' | 'watermark' | 'pagination' | 'layout';Defined in packages/document/src/layout/pdf/layout-tree.ts:7
PdfFontLoadertype#
type PdfFontLoader = (
family: string,
style: { bold: boolean; italic: boolean },
) => Promise<ArrayBuffer | Uint8Array | null>;Defined in packages/document/src/layout/pdf/font-loading.ts:5
PdfItemtype#
type PdfItem = PdfTextRun | PdfRect | PdfLine | PdfPath | PdfImage | PdfLinkArea | PdfDestination | PdfGroup;Defined in packages/document/src/layout/pdf/layout-tree.ts:160
PdfMatrixtype#
type PdfMatrix = readonly [number, number, number, number, number, number];Defined in packages/document/src/layout/pdf/layout-tree.ts:150
PdfPathCommandtype#
type PdfPathCommand =
| readonly ['M', number, number]
| readonly ['L', number, number]
| readonly ['C', number, number, number, number, number, number]
| readonly ['Z'];Defined in packages/document/src/layout/pdf/layout-tree.ts:104
PdfStructTypetype#
type PdfStructType =
| 'P'
| 'H1'
| 'H2'
| 'H3'
| 'H4'
| 'H5'
| 'H6'
| 'L'
| 'LI'
| 'Lbl'
| 'LBody'
| 'Table'
| 'TR'
| 'TH'
| 'TD'
| 'Figure'
| 'Link'
| 'Note'
| 'Span'
| 'TOC'
| 'TOCI'
| 'Sect'
| 'BlockQuote'
| 'Code';Defined in packages/document/src/layout/pdf/layout-tree.ts:9
PdfUnderlineStyletype#
type PdfUnderlineStyle = 'single' | 'double' | 'thick' | 'dotted' | 'dash' | 'dotDash' | 'wave';Defined in packages/document/src/layout/pdf/layout-tree.ts:53
ZipLimitCodetype#
type ZipLimitCode = 'too-many-entries' | 'entry-too-large' | 'archive-too-large' | 'ratio-too-high';Defined in packages/document/src/docx/errors.ts:8
@birchui/document/locales#
DOCUMENT_LOCALESconst#
const DOCUMENT_LOCALES: Record<string, Record<string, string>>Defined in packages/document/src/locales/index.ts:11
documentDeconst#
const documentDe: Record<string, string>Defined in packages/document/src/locales/de.ts:8
documentEnconst#
const documentEn: Record<string, string>Defined in packages/document/src/locales/en.ts:8
documentEsconst#
const documentEs: Record<string, string>Defined in packages/document/src/locales/es.ts:8
documentFrconst#
const documentFr: Record<string, string>Defined in packages/document/src/locales/fr.ts:8
documentJaconst#
const documentJa: Record<string, string>Defined in packages/document/src/locales/ja.ts:8
documentPtconst#
const documentPt: Record<string, string>Defined in packages/document/src/locales/pt.ts:8
documentZhconst#
const documentZh: Record<string, string>Defined in packages/document/src/locales/zh.ts:8
@birchui/document/pdf#
clearRegisteredFontsfunction#
function clearRegisteredFonts(): voidDefined in packages/document/src/layout/pdf/font-substitution.ts:89
documentToPdffunction#
function documentToPdf(input: DocumentInput, options: DocumentPdfOptions = {}): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | DocumentPdfOptions | — |
Defined in packages/document/src/layout/pdf/document-layout.ts:471
fontFamilyStackfunction#
function fontFamilyStack(fontFamily: string): stringA CSS font-family list that puts the metric-compatible substitutes right after each requested family.
| Parameter | Type | Description |
|---|---|---|
fontFamily | string | — |
Defined in packages/document/src/layout/pdf/font-substitution.ts:48
fontSubstitutesfunction#
function fontSubstitutes(family: string): readonly string[]| Parameter | Type | Description |
|---|---|---|
family | string | — |
Defined in packages/document/src/layout/pdf/font-substitution.ts:36
layoutDocumentfunction#
function layoutDocument(input: DocumentInput, options: DocumentPdfOptions = {}): { layout: PdfDocumentLayout; warnings: string[]; missingFonts: string[] }| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | DocumentPdfOptions | — |
Defined in packages/document/src/layout/pdf/document-layout.ts:105
layoutToPdffunction#
function layoutToPdf(layout: PdfDocumentLayout, options: PdfWriteOptions = {}): Promise<Uint8Array>| Parameter | Type | Description |
|---|---|---|
layout | PdfDocumentLayout | — |
optionsoptional | PdfWriteOptions | — |
Defined in packages/document/src/layout/pdf/writer.ts:722
multiplyMatrixfunction#
function multiplyMatrix(first: PdfMatrix, second: PdfMatrix): PdfMatrixDefined in packages/document/src/layout/pdf/layout-tree.ts:204
registeredFontsfunction#
function registeredFonts(): readonly PdfFontSource[]Defined in packages/document/src/layout/pdf/font-substitution.ts:85
registerFontsfunction#
function registerFonts(fonts: readonly PdfFontSource[]): voidMakes font files available to every PDF written afterwards, in the browser and on a server, in addition to the
fonts passed with a single call. Registering a face again replaces it.
| Parameter | Type | Description |
|---|---|---|
fonts | readonly PdfFontSource[] | — |
Defined in packages/document/src/layout/pdf/font-substitution.ts:70
renderDocumentPdffunction#
function renderDocumentPdf(input: DocumentInput, options: DocumentPdfOptions = {}): Promise<DocumentPdfResult>| Parameter | Type | Description |
|---|---|---|
input | DocumentInput | — |
optionsoptional | DocumentPdfOptions | — |
Defined in packages/document/src/layout/pdf/document-layout.ts:457
rotationMatrixfunction#
function rotationMatrix(degrees: number, centerX: number, centerY: number): PdfMatrix| Parameter | Type | Description |
|---|---|---|
degrees | number | — |
centerX | number | — |
centerY | number | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:197
writePdffunction#
function writePdf(layout: PdfDocumentLayout, options: PdfWriteOptions = {}): Promise<PdfWriteResult>| Parameter | Type | Description |
|---|---|---|
layout | PdfDocumentLayout | — |
optionsoptional | PdfWriteOptions | — |
Defined in packages/document/src/layout/pdf/writer.ts:613
PdfFontErrorclass#
class PdfFontError extends Error
new PdfFontError(readonly families: readonly string[])Defined in packages/document/src/layout/pdf/font-substitution.ts:97
FONT_SUBSTITUTIONSconst#
const FONT_SUBSTITUTIONS: Readonly<Record<string, readonly string[]>>Fonts with the same advance widths as the font they replace, so text set in the substitute breaks at the same places. Carlito and Caladea match Calibri and Cambria; the Liberation and Croscore families match Arial, Times New Roman and Courier New; Gelasio matches Georgia and Selawik matches Segoe UI.
Defined in packages/document/src/layout/pdf/font-substitution.ts:8
DocumentPdfOptionsinterface#
interface DocumentPdfOptions extends PdfWriteOptions| Property | Type | Description |
|---|---|---|
fontsoptional | readonly PdfFontSource[] | — |
titleoptional | string | — |
authoroptional | string | — |
subjectoptional | string | — |
keywordsoptional | string | — |
languageoptional | string | — |
outlineoptional | boolean | — |
compressoptional | boolean | undefined | Inherited from PdfWriteOptions. |
creationDateoptional | Date | undefined | Inherited from PdfWriteOptions. |
produceroptional | string | undefined | Inherited from PdfWriteOptions. |
pdfAoptional | boolean | undefined | Inherited from PdfWriteOptions. |
taggedoptional | boolean | undefined | Inherited from PdfWriteOptions. |
Defined in packages/document/src/layout/pdf/document-layout.ts:28
DocumentPdfResultinterface#
interface DocumentPdfResult| Property | Type | Description |
|---|---|---|
bytes | Uint8Array | — |
warnings | string[] | — |
pageCount | number | — |
missingFonts | string[] | Font families the document asks for that had no font file and no metric-compatible substitute. |
Defined in packages/document/src/layout/pdf/document-layout.ts:38
PdfClusterinterface#
interface PdfClusterDefined in packages/document/src/layout/pdf/layout-tree.ts:47
PdfColorinterface#
interface PdfColorDefined in packages/document/src/layout/pdf/layout-tree.ts:1
PdfDestinationinterface#
interface PdfDestinationDefined in packages/document/src/layout/pdf/layout-tree.ts:144
PdfDocumentLayoutinterface#
interface PdfDocumentLayout| Property | Type | Description |
|---|---|---|
pages | PdfPage[] | — |
outlineoptional | PdfOutlineEntry[] | — |
titleoptional | string | — |
authoroptional | string | — |
subjectoptional | string | — |
keywordsoptional | string | — |
languageoptional | string | — |
fontsoptional | readonly PdfFontSource[] | — |
structureoptional | readonly PdfStructNode[] | — |
pdfAoptional | boolean | — |
createdoptional | Date | — |
modifiedoptional | Date | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:182
PdfFontSourceinterface#
interface PdfFontSourceDefined in packages/document/src/layout/pdf/layout-tree.ts:175
PdfGroupinterface#
interface PdfGroup extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'group' | — |
items | PdfItem[] | — |
matrixoptional | PdfMatrix | — |
clipoptional | { x: number; y: number; width: number; height: number } | — |
opacityoptional | number | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:152
PdfImageinterface#
interface PdfImage extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'image' | — |
x | number | — |
y | number | — |
width | number | — |
height | number | — |
data | Uint8Array | — |
mime | 'image/jpeg' | 'image/png' | — |
altoptional | string | — |
rotationoptional | number | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:121
PdfLineinterface#
interface PdfLine extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'line' | — |
x1 | number | — |
y1 | number | — |
x2 | number | — |
y2 | number | — |
coloroptional | PdfColor | — |
widthoptional | number | — |
dashoptional | readonly number[] | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:93
PdfLinkAreainterface#
interface PdfLinkArea| Property | Type | Description |
|---|---|---|
kind | 'link' | — |
x | number | — |
y | number | — |
width | number | — |
height | number | — |
hrefoptional | string | — |
destinationoptional | string | — |
structoptional | number | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:133
PdfOutlineEntryinterface#
interface PdfOutlineEntryDefined in packages/document/src/layout/pdf/layout-tree.ts:168
PdfPageinterface#
interface PdfPageDefined in packages/document/src/layout/pdf/layout-tree.ts:162
PdfPathinterface#
interface PdfPath extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'path' | — |
commands | readonly PdfPathCommand[] | — |
filloptional | PdfColor | — |
strokeoptional | PdfColor | — |
strokeWidthoptional | number | — |
dashoptional | readonly number[] | — |
roundCapsoptional | boolean | — |
roundJoinsoptional | boolean | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:110
PdfRectinterface#
interface PdfRect extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'rect' | — |
x | number | — |
y | number | — |
width | number | — |
height | number | — |
filloptional | PdfColor | — |
strokeoptional | PdfColor | — |
strokeWidthoptional | number | — |
dashoptional | readonly number[] | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:81
PdfStructNodeinterface#
interface PdfStructNode| Property | Type | Description |
|---|---|---|
type | PdfStructType | — |
parent | number | — |
altoptional | string | — |
languageoptional | string | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:35
PdfTagginginterface#
interface PdfTagging| Property | Type | Description |
|---|---|---|
structoptional | number | — |
artifactoptional | PdfArtifactType | — |
Defined in packages/document/src/layout/pdf/layout-tree.ts:42
PdfTextRuninterface#
interface PdfTextRun extends PdfTagging| Property | Type | Description |
|---|---|---|
kind | 'text' | — |
x | number | — |
baseline | number | — |
width | number | — |
text | string | — |
fontFamily | string | — |
fontSize | number | — |
boldoptional | boolean | — |
italicoptional | boolean | — |
coloroptional | PdfColor | — |
underlineoptional | boolean | — |
underlineStyleoptional | PdfUnderlineStyle | The line drawn for underline; a single line when left out. |
underlineColoroptional | PdfColor | The colour of the underline; the colour of the text when left out. |
strikeoptional | boolean | — |
doubleStrikeoptional | boolean | — |
backgroundoptional | PdfColor | — |
linkoptional | string | — |
directionoptional | 'ltr' | 'rtl' | — |
clustersoptional | readonly PdfCluster[] | — |
trailingSpaceoptional | boolean | — |
decorationoptional | { x: number; width: number } | — |
structoptional | number | undefined | Inherited from PdfTagging. |
artifactoptional | PdfArtifactType | undefined | Inherited from PdfTagging. |
Defined in packages/document/src/layout/pdf/layout-tree.ts:55
PdfWriteOptionsinterface#
interface PdfWriteOptions| Property | Type | Description |
|---|---|---|
compressoptional | boolean | — |
creationDateoptional | Date | — |
produceroptional | string | — |
pdfAoptional | boolean | — |
taggedoptional | boolean | — |
Defined in packages/document/src/layout/pdf/writer.ts:29
PdfWriteResultinterface#
interface PdfWriteResultDefined in packages/document/src/layout/pdf/writer.ts:37
PdfArtifactTypetype#
type PdfArtifactType = 'header' | 'footer' | 'watermark' | 'pagination' | 'layout';Defined in packages/document/src/layout/pdf/layout-tree.ts:7
PdfFontLoadertype#
type PdfFontLoader = (
family: string,
style: { bold: boolean; italic: boolean },
) => Promise<ArrayBuffer | Uint8Array | null>;Defined in packages/document/src/layout/pdf/font-loading.ts:5
PdfItemtype#
type PdfItem = PdfTextRun | PdfRect | PdfLine | PdfPath | PdfImage | PdfLinkArea | PdfDestination | PdfGroup;Defined in packages/document/src/layout/pdf/layout-tree.ts:160
PdfMatrixtype#
type PdfMatrix = readonly [number, number, number, number, number, number];Defined in packages/document/src/layout/pdf/layout-tree.ts:150
PdfPathCommandtype#
type PdfPathCommand =
| readonly ['M', number, number]
| readonly ['L', number, number]
| readonly ['C', number, number, number, number, number, number]
| readonly ['Z'];Defined in packages/document/src/layout/pdf/layout-tree.ts:104
PdfStructTypetype#
type PdfStructType =
| 'P'
| 'H1'
| 'H2'
| 'H3'
| 'H4'
| 'H5'
| 'H6'
| 'L'
| 'LI'
| 'Lbl'
| 'LBody'
| 'Table'
| 'TR'
| 'TH'
| 'TD'
| 'Figure'
| 'Link'
| 'Note'
| 'Span'
| 'TOC'
| 'TOCI'
| 'Sect'
| 'BlockQuote'
| 'Code';Defined in packages/document/src/layout/pdf/layout-tree.ts:9
PdfUnderlineStyletype#
type PdfUnderlineStyle = 'single' | 'double' | 'thick' | 'dotted' | 'dash' | 'dotDash' | 'wave';Defined in packages/document/src/layout/pdf/layout-tree.ts:53