devexpress-richedit
Version:
DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.
1,527 lines • 85.3 kB
TypeScript
/**
* DevExpress WebRichEdit (dx.richedit.d.ts)
* Version: 24.2.6
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* License: https://www.devexpress.com/Support/EULAs
*/
declare module DevExpress.RichEdit {
export interface IInitDocumentProcessorOptions {
cloneCurrentModel?: boolean;
}
export enum ViewType {
Simple = 0,
PrintLayout = 1
}
export enum MergeMode {
NewParagraph = 0,
NewSection = 1
}
export abstract class Collection<T> {
get count(): number;
getByIndex(index: number): T | null;
}
export class Font {
get name(): string;
get cssName(): string;
delete(): void;
}
export class FontCollection extends Collection<Font> {
getByName(name: string): Font | null;
create(name: string, cssName?: string): Font | null;
getAllFontNames(): string[];
}
export interface IInterval {
start: number;
length: number;
}
export class Interval implements IInterval {
start: number;
length: number;
get end(): number;
constructor(start: number, length: number);
}
export enum ParagraphAlignment {
Left = 0,
Right = 1,
Center = 2,
Justify = 3
}
export enum ParagraphLineSpacingType {
Single = 0,
Sesquialteral = 1,
Double = 2,
Multiple = 3,
Exactly = 4,
AtLeast = 5
}
export enum ParagraphFirstLineIndent {
None = 0,
Indented = 1,
Hanging = 2
}
export interface IParagraphProperties {
alignment?: ParagraphAlignment;
outlineLevel?: number;
rightIndent?: number;
spacingBefore?: number;
spacingAfter?: number;
lineSpacingType?: ParagraphLineSpacingType;
firstLineIndentType?: ParagraphFirstLineIndent;
firstLineIndent?: number;
contextualSpacing?: boolean;
keepLinesTogether?: boolean;
pageBreakBefore?: boolean;
leftIndent?: number;
lineSpacing?: number;
backColor?: string;
}
export enum ListType {
MultiLevel = 0,
Number = 1,
Bullet = 2
}
export enum ListLevelFormat {
Decimal = 0,
Hiragana = 1,
FullWidthHiragana = 2,
ArabicAbjad = 3,
ArabicAlpha = 4,
Bullet = 5,
CardinalText = 6,
Chicago = 7,
ChineseCounting = 8,
ChineseCountingThousand = 9,
ChineseLegalSimplified = 10,
Chosung = 11,
DecimalEnclosedCircle = 12,
DecimalEnclosedCircleChinese = 13,
DecimalEnclosedFullstop = 14,
DecimalEnclosedParentheses = 15,
DecimalFullWidth = 16,
DecimalFullWidth2 = 17,
DecimalHalfWidth = 18,
DecimalZero = 19,
Ganada = 20,
Hebrew1 = 21,
Hebrew2 = 22,
Hex = 23,
HindiConsonants = 24,
HindiDescriptive = 25,
HindiNumbers = 26,
HindiVowels = 27,
IdeographDigital = 28,
IdeographEnclosedCircle = 29,
IdeographLegalTraditional = 30,
IdeographTraditional = 31,
IdeographZodiac = 32,
IdeographZodiacTraditional = 33,
Iroha = 34,
IrohaFullWidth = 35,
JapaneseCounting = 36,
JapaneseDigitalTenThousand = 37,
JapaneseLegal = 38,
KoreanCounting = 39,
KoreanDigital = 40,
KoreanDigital2 = 41,
KoreanLegal = 42,
LowerLetter = 43,
LowerRoman = 44,
None = 45,
NumberInDash = 46,
Ordinal = 47,
OrdinalText = 48,
RussianLower = 49,
RussianUpper = 50,
TaiwaneseCounting = 51,
TaiwaneseCountingThousand = 52,
TaiwaneseDigital = 53,
ThaiDescriptive = 54,
ThaiLetters = 55,
ThaiNumbers = 56,
UpperLetter = 57,
UpperRoman = 58,
VietnameseDescriptive = 59
}
export enum ListLevelNumberAlignment {
Left = 0,
Center = 1,
Right = 2
}
export class ListLevelSettings {
displayFormatString: string;
format: ListLevelFormat;
start: number;
alignment: ListLevelNumberAlignment;
separator: string;
leftIndent: number;
firstLineIndent: number;
firstLineIndentType: ParagraphFirstLineIndent;
fontName: string;
fontColor: string;
fontSize: number;
fontBold: boolean;
fontItalic: boolean;
}
export class List {
get index(): number;
get type(): ListType;
get levelProperties(): ListLevelSettings[];
set levelProperties(settings: ListLevelSettings[]);
}
export class Paragraph {
get index(): number;
get interval(): Interval;
get properties(): IParagraphProperties;
set properties(properties: IParagraphProperties);
get list(): List | null;
get listLevel(): number;
addToList(list: List, targetListLevel?: number): void;
}
export class ParagraphCollection extends Collection<Paragraph> {
create(position: number): Paragraph;
find(position: number | IInterval): Paragraph[];
}
export class Bookmark {
get index(): number;
get subDocument(): SubDocument;
get interval(): Interval;
get name(): string;
delete(): void;
}
export class BookmarkCollection<TBookmark extends Bookmark> extends Collection<TBookmark> {
find(position: number | IInterval | IInterval[] | string | RegExp): TBookmark[];
create(interval: IInterval, name: string): Bookmark;
}
export class RangePermission {
get index(): number;
get subDocument(): SubDocument;
get interval(): Interval;
get userName(): string;
get group(): string;
delete(): void;
}
export interface IRangePermissionSearchOptions {
position?: number | IInterval | IInterval[];
userName?: string | RegExp;
group?: string | RegExp;
}
export class RangePermissionCollection extends Collection<RangePermission> {
protectRange(intervals: IInterval[], userName?: string, group?: string): RangePermission[];
find(options: IRangePermissionSearchOptions): RangePermission[];
isAllowEdit(position: number | IInterval | IInterval[]): boolean;
create(interval: IInterval, userName?: string, group?: string): RangePermission;
}
export class TableCell extends TableElementBase {
get index(): number;
get interval(): Interval;
get parentRow(): TableRow;
get width(): TableWidth;
set width(value: TableWidth);
get backgroundColor(): string;
set backgroundColor(value: string);
get contentHorizontalAlignment(): TableContentHorizontalAlignment | null;
set contentHorizontalAlignment(value: TableContentHorizontalAlignment);
get contentVerticalAlignment(): TableContentVerticalAlignment;
set contentVerticalAlignment(value: TableContentVerticalAlignment);
get characterProperties(): CharacterProperties;
set characterProperties(value: ICharacterProperties);
get borders(): TableCellBorders;
set borders(value: ITableCellBorders);
get margins(): Margins;
set margins(value: IMargins);
split(columnCount: number, rowCount: number): void;
}
export class TableCellCollection extends TableBaseCollection<TableCell> {
insert(index: number, toRight?: boolean): TableCell;
remove(index: number): void;
}
export class TableRow extends TableElementBase {
get index(): number;
get interval(): Interval;
get cells(): TableCellCollection;
get parentTable(): Table;
get height(): TableRowHeight;
set height(value: TableRowHeight);
}
export class TableRowCollection extends TableBaseCollection<TableRow> {
insert(index: number, below?: boolean): TableRow;
remove(index: number): void;
}
export class Table extends TableElementBase {
get index(): number;
get interval(): Interval;
delete(): void;
get rows(): TableRowCollection;
get parentCell(): TableCell | null;
get autoFit(): boolean;
set autoFit(value: boolean);
get width(): TableWidth;
set width(value: TableWidth);
get styleName(): string;
set styleName(value: string);
get tableStyleOptions(): TableStyleOptions;
set tableStyleOptions(value: TableStyleOptions);
get backgroundColor(): string;
set backgroundColor(value: string);
get contentHorizontalAlignment(): TableContentHorizontalAlignment | null;
set contentHorizontalAlignment(value: TableContentHorizontalAlignment);
get contentVerticalAlignment(): TableContentVerticalAlignment | null;
set contentVerticalAlignment(value: TableContentVerticalAlignment);
get borders(): TableBorders;
set borders(value: ITableBorders);
get cellMargins(): Margins;
set cellMargins(value: IMargins);
mergeCells(startPosition: TableCellPosition, endPosition: TableCellPosition): void;
}
export class TableCollection extends TableBaseCollection<Table> {
create(position: number, columnCount: number, rowCount: number): Table;
find(position: number | IInterval): Table[];
}
export enum FieldName {
Unknown = 0,
Time = 1,
Date = 2,
Page = 3,
NumPages = 4,
MergeField = 5,
DocVariable = 6,
Hyperlink = 7,
Seq = 8,
Tc = 9,
PageRef = 10,
Toc = 11,
FillIn = 12
}
export class Field {
get index(): number;
get interval(): Interval;
get codeInterval(): Interval;
get subDocument(): SubDocument;
get resultInterval(): Interval;
get isShowCode(): boolean;
set isShowCode(val: boolean);
get isHyperlink(): boolean;
get name(): FieldName;
delete(): void;
update(callback?: (self: Field) => void): boolean;
}
export class UpdateFieldsOptions {
doInAllSubDocuments: boolean;
updateTocFields: boolean;
constructor(doInAllSubDocuments?: boolean, updateTocFields?: boolean);
}
export class FieldCollection extends Collection<Field> {
create(position: number | Interval, code?: string): Field;
createMergeField(position: number, name: string): Field;
find(position: number | IInterval): Field[];
showAllFieldResults(doInAllSubDocuments?: boolean): void;
showAllFieldCodes(doInAllSubDocuments?: boolean): void;
updateAllFields(callback?: () => void, options?: UpdateFieldsOptions): boolean;
}
export class HyperlinkInfo {
constructor(text: string, url?: string, bookmark?: string, tooltip?: string);
text: string;
tooltip: string;
url: string;
bookmark: string;
}
export class Hyperlink extends Field {
get hyperlinkInfo(): HyperlinkInfo;
set hyperlinkInfo(hyperlinkInfo: HyperlinkInfo);
}
export class HyperlinkCollection extends Collection<Hyperlink> {
create(position: number | IInterval, hyperlinkInfo: HyperlinkInfo): Hyperlink;
find(position: number | IInterval): Hyperlink[];
}
export class Size {
width: number;
height: number;
}
export enum WrapType {
Inline = 0,
TopAndBottom = 1,
Tight = 2,
Through = 3,
Square = 4,
BehindText = 5,
InFrontOfText = 6
}
export enum WrapSide {
Both = 0,
Left = 1,
Right = 2,
Largest = 3
}
export interface IFloatingObjectDistance {
left?: number;
right?: number;
top?: number;
bottom?: number;
}
export enum FloatingObjectHorizontalPositionType {
Aligned = 0,
Absolute = 1,
Relative = 2
}
export enum FloatingObjectHorizontalAnchorElement {
Page = 0,
Character = 1,
Column = 2,
Margin = 3,
LeftMargin = 4,
RightMargin = 5,
InsideMargin = 6,
OutsideMargin = 7
}
export enum FloatingObjectHorizontalAlignment {
None = 0,
Left = 1,
Center = 2,
Right = 3,
Inside = 4,
Outside = 5
}
export class HorizontalAlignedPosition {
readonly type = FloatingObjectHorizontalPositionType.Aligned;
relativeTo: FloatingObjectHorizontalAnchorElement;
alignment: FloatingObjectHorizontalAlignment;
}
export class HorizontalAbsolutePosition {
readonly type = FloatingObjectHorizontalPositionType.Absolute;
relativeTo: FloatingObjectHorizontalAnchorElement;
position: number;
}
export class HorizontalRelativePosition {
readonly type = FloatingObjectHorizontalPositionType.Relative;
relativeTo: FloatingObjectHorizontalAnchorElement.Margin | FloatingObjectHorizontalAnchorElement.Page | FloatingObjectHorizontalAnchorElement.LeftMargin | FloatingObjectHorizontalAnchorElement.RightMargin | FloatingObjectHorizontalAnchorElement.InsideMargin | FloatingObjectHorizontalAnchorElement.OutsideMargin;
relativePosition: number;
}
export interface IHorizontalAlignedPosition {
relativeTo: FloatingObjectHorizontalAnchorElement;
alignment: FloatingObjectHorizontalAlignment;
}
export interface IHorizontalAbsolutePosition {
relativeTo: FloatingObjectHorizontalAnchorElement;
position: number;
}
export interface IHorizontalRelativePosition {
relativeTo: FloatingObjectHorizontalAnchorElement.Margin | FloatingObjectHorizontalAnchorElement.Page | FloatingObjectHorizontalAnchorElement.LeftMargin | FloatingObjectHorizontalAnchorElement.RightMargin | FloatingObjectHorizontalAnchorElement.InsideMargin | FloatingObjectHorizontalAnchorElement.OutsideMargin;
relativePosition: number;
}
export enum FloatingObjectVerticalPositionType {
Aligned = 0,
Absolute = 1,
Relative = 2
}
export enum FloatingObjectVerticalAnchorElement {
Page = 0,
Line = 1,
Paragraph = 2,
Margin = 3,
TopMargin = 4,
BottomMargin = 5,
InsideMargin = 6,
OutsideMargin = 7
}
export enum FloatingObjectVerticalAlignment {
Top = 1,
Center = 2,
Bottom = 3,
Inside = 4,
Outside = 5
}
export class VerticalAlignedPosition {
readonly type = FloatingObjectVerticalPositionType.Aligned;
relativeTo: FloatingObjectVerticalAnchorElement.Page | FloatingObjectVerticalAnchorElement.Line | FloatingObjectVerticalAnchorElement.Margin | FloatingObjectVerticalAnchorElement.TopMargin | FloatingObjectVerticalAnchorElement.BottomMargin | FloatingObjectVerticalAnchorElement.InsideMargin | FloatingObjectVerticalAnchorElement.OutsideMargin;
alignment: FloatingObjectVerticalAlignment;
}
export class VerticalAbsolutePosition {
readonly type = FloatingObjectVerticalPositionType.Absolute;
relativeTo: FloatingObjectVerticalAnchorElement;
position: number;
}
export class VerticalRelativePosition {
readonly type = FloatingObjectVerticalPositionType.Relative;
relativeTo: FloatingObjectVerticalAnchorElement.Page | FloatingObjectVerticalAnchorElement.Margin | FloatingObjectVerticalAnchorElement.TopMargin | FloatingObjectVerticalAnchorElement.BottomMargin | FloatingObjectVerticalAnchorElement.InsideMargin | FloatingObjectVerticalAnchorElement.OutsideMargin;
relativePosition: number;
}
export interface IVerticalAlignedPosition {
relativeTo: FloatingObjectVerticalAnchorElement.Page | FloatingObjectVerticalAnchorElement.Line | FloatingObjectVerticalAnchorElement.Margin | FloatingObjectVerticalAnchorElement.TopMargin | FloatingObjectVerticalAnchorElement.BottomMargin | FloatingObjectVerticalAnchorElement.InsideMargin | FloatingObjectVerticalAnchorElement.OutsideMargin;
alignment: FloatingObjectVerticalAlignment;
}
export interface IVerticalAbsolutePosition {
relativeTo: FloatingObjectVerticalAnchorElement;
position: number;
}
export interface IVerticalRelativePosition {
relativeTo: FloatingObjectVerticalAnchorElement.Page | FloatingObjectVerticalAnchorElement.Margin | FloatingObjectVerticalAnchorElement.TopMargin | FloatingObjectVerticalAnchorElement.BottomMargin | FloatingObjectVerticalAnchorElement.InsideMargin | FloatingObjectVerticalAnchorElement.OutsideMargin;
relativePosition: number;
}
export class FloatingImage extends Image {
get outlineColor(): string;
set outlineColor(value: string);
get outlineWidth(): number;
set outlineWidth(value: number);
get wrapSide(): WrapSide;
set wrapSide(wrapSide: WrapSide);
get distance(): IFloatingObjectDistance;
set distance(value: IFloatingObjectDistance);
getHorizontalPosition(): HorizontalAlignedPosition | HorizontalAbsolutePosition | HorizontalRelativePosition;
setHorizontalPosition(position: IHorizontalAlignedPosition | IHorizontalAbsolutePosition | IHorizontalRelativePosition): void;
getVerticalPosition(): VerticalAlignedPosition | VerticalAbsolutePosition | VerticalRelativePosition;
setVerticalPosition(position: IVerticalAlignedPosition | IVerticalAbsolutePosition | IVerticalRelativePosition): void;
getWrapType(): WrapType;
}
export abstract class Image {
get base64(): string;
get url(): string | undefined;
get interval(): Interval;
get isLoaded(): boolean;
get extension(): string;
get originalSize(): Size;
get actualSize(): Size;
set actualSize(value: Size);
get description(): string;
set description(value: string);
abstract getWrapType(): WrapType;
changeWrapType(wrapType: WrapType): InlineImage | FloatingImage;
delete(): void;
onLoaded(callback: (image: Image) => void): void;
reload(base64: string, size?: Size): void;
}
export class InlineImage extends Image {
getWrapType(): WrapType;
}
export interface IInsertedInlineImageOptions {
base64?: string;
url?: string;
actualSize: Size;
callback?: (image: InlineImage) => void;
description?: string;
}
export interface IInsertedFloatingImageOptions {
base64?: string;
url?: string;
actualSize: Size;
callback?: (image: FloatingImage) => void;
description?: string;
outlineColor?: string;
outlineWidth?: number;
wrapSide?: WrapSide;
wrapType?: WrapType;
distance?: IFloatingObjectDistance;
horizontalPosition?: IHorizontalAlignedPosition | IHorizontalAbsolutePosition | IHorizontalRelativePosition;
verticalPosition?: IVerticalAlignedPosition | IVerticalAbsolutePosition | IVerticalRelativePosition;
}
export class ImageIterator {
get image(): InlineImage | FloatingImage | null;
next(): boolean;
}
export class Images {
createInline(position: number, options: IInsertedInlineImageOptions): InlineImage;
createFloating(position: number, options: IInsertedFloatingImageOptions): FloatingImage;
getIterator(startPosition?: number): ImageIterator;
getAllImages(): (InlineImage | FloatingImage)[];
find(position: number | Interval | Interval[]): (InlineImage | FloatingImage)[];
}
export enum SubDocumentType {
Main = 0,
Header = 1,
Footer = 2,
TextBox = 3,
FootNote = 4,
EndNote = 5
}
export enum SectionBreakType {
NextPage = 0,
OddPage = 1,
EvenPage = 2,
Continuous = 3
}
export class Margins {
left: number;
right: number;
top: number;
bottom: number;
}
export enum PaperSize {
Custom = 0,
Letter = 1,
LetterSmall = 2,
Tabloid = 3,
Ledger = 4,
Legal = 5,
Statement = 6,
Executive = 7,
A3 = 8,
A4 = 9,
A4Small = 10,
A5 = 11,
B4 = 12,
B5 = 13,
Folio = 14,
Quarto = 15,
Standard10x14 = 16,
Standard11x17 = 17,
Note = 18,
Number9Envelope = 19,
Number10Envelope = 20,
Number11Envelope = 21,
Number12Envelope = 22,
Number14Envelope = 23,
CSheet = 24,
DSheet = 25,
ESheet = 26,
DLEnvelope = 27,
C5Envelope = 28,
C3Envelope = 29,
C4Envelope = 30,
C6Envelope = 31,
C65Envelope = 32,
B4Envelope = 33,
B5Envelope = 34,
B6Envelope = 35,
ItalyEnvelope = 36,
MonarchEnvelope = 37,
PersonalEnvelope = 38,
USStandardFanfold = 39,
GermanStandardFanfold = 40,
GermanLegalFanfold = 41,
IsoB4 = 42,
JapanesePostcard = 43,
Standard9x11 = 44,
Standard10x11 = 45,
Standard15x11 = 46,
InviteEnvelope = 47,
LetterExtra = 50,
LegalExtra = 51,
TabloidExtra = 52,
A4Extra = 53,
LetterTransverse = 54,
A4Transverse = 55,
LetterExtraTransverse = 56,
APlus = 57,
BPlus = 58,
LetterPlus = 59,
A4Plus = 60,
A5Transverse = 61,
B5Transverse = 62,
A3Extra = 63,
A5Extra = 64,
B5Extra = 65,
A2 = 66,
A3Transverse = 67,
A3ExtraTransverse = 68,
JapaneseDoublePostcard = 69,
A6 = 70,
JapaneseEnvelopeKakuNumber2 = 71,
JapaneseEnvelopeKakuNumber3 = 72,
JapaneseEnvelopeChouNumber3 = 73,
JapaneseEnvelopeChouNumber4 = 74,
LetterRotated = 75,
A3Rotated = 76,
A4Rotated = 77,
A5Rotated = 78,
B4JisRotated = 79,
B5JisRotated = 80,
JapanesePostcardRotated = 81,
JapaneseDoublePostcardRotated = 82,
A6Rotated = 83,
JapaneseEnvelopeKakuNumber2Rotated = 84,
JapaneseEnvelopeKakuNumber3Rotated = 85,
JapaneseEnvelopeChouNumber3Rotated = 86,
JapaneseEnvelopeChouNumber4Rotated = 87,
B6Jis = 88,
B6JisRotated = 89,
Standard12x11 = 90,
JapaneseEnvelopeYouNumber4 = 91,
JapaneseEnvelopeYouNumber4Rotated = 92,
Prc16K = 93,
Prc32K = 94,
Prc32KBig = 95,
PrcEnvelopeNumber1 = 96,
PrcEnvelopeNumber2 = 97,
PrcEnvelopeNumber3 = 98,
PrcEnvelopeNumber4 = 99,
PrcEnvelopeNumber5 = 100,
PrcEnvelopeNumber6 = 101,
PrcEnvelopeNumber7 = 102,
PrcEnvelopeNumber8 = 103,
PrcEnvelopeNumber9 = 104,
PrcEnvelopeNumber10 = 105,
Prc16KRotated = 106,
Prc32KRotated = 107,
Prc32KBigRotated = 108,
PrcEnvelopeNumber1Rotated = 109,
PrcEnvelopeNumber2Rotated = 110,
PrcEnvelopeNumber3Rotated = 111,
PrcEnvelopeNumber4Rotated = 112,
PrcEnvelopeNumber5Rotated = 113,
PrcEnvelopeNumber6Rotated = 114,
PrcEnvelopeNumber7Rotated = 115,
PrcEnvelopeNumber8Rotated = 116,
PrcEnvelopeNumber9Rotated = 117,
PrcEnvelopeNumber10Rotated = 118
}
export enum HeaderFooterType {
First = 0,
Odd = 1,
Even = 2,
Primary = 1
}
export class Section {
get index(): number;
get interval(): Interval;
get margins(): Margins;
set margins(margins: Margins);
get columnCount(): number;
set columnCount(columnCount: number);
get pageSize(): Size;
set pageSize(size: Size);
get headerOffset(): number;
set headerOffset(offset: number);
get footerOffset(): number;
set footerOffset(offset: number);
get paperSize(): PaperSize;
set paperSize(paperSize: PaperSize);
get landscape(): boolean;
set landscape(landscape: boolean);
getHeader(type?: HeaderFooterType, createIfNotExist?: boolean): SubDocument | null;
getFooter(type?: HeaderFooterType, createIfNotExist?: boolean): SubDocument | null;
}
export enum DocumentFormat {
PlainText = 1,
Rtf = 2,
Html = 3,
OpenXml = 4
}
export enum CharacterPropertiesScript {
Normal = 0,
Subscript = 1,
Superscript = 2
}
export class CharacterProperties {
fontName: string;
size: number;
foreColor: string;
backColor: string;
highlightColor: string;
underline: boolean;
underlineColor: string;
bold: boolean;
italic: boolean;
strikeout: boolean;
underlineWordsOnly: boolean;
script: CharacterPropertiesScript;
allCaps: boolean;
hidden: boolean;
smallCaps: boolean;
}
export interface ICharacterProperties {
fontName?: string;
size?: number;
foreColor?: string;
backColor?: string;
highlightColor?: string;
underline?: boolean;
underlineColor?: string;
bold?: boolean;
italic?: boolean;
strikeout?: boolean;
underlineWordsOnly?: boolean;
script?: CharacterPropertiesScript;
allCaps?: boolean;
hidden?: boolean;
smallCaps?: boolean;
}
export class ParagraphProperties {
alignment: ParagraphAlignment;
outlineLevel: number;
rightIndent: number;
spacingBefore: number;
spacingAfter: number;
lineSpacingType: ParagraphLineSpacingType;
firstLineIndentType: ParagraphFirstLineIndent;
firstLineIndent: number;
contextualSpacing: boolean;
keepLinesTogether: boolean;
pageBreakBefore: boolean;
leftIndent: number;
lineSpacing: number;
backColor: string;
}
export class SubDocument {
get paragraphs(): ParagraphCollection;
get bookmarks(): BookmarkCollection<Bookmark>;
get rangePermissions(): RangePermissionCollection;
get tables(): TableCollection;
get fields(): FieldCollection;
get hyperlinks(): HyperlinkCollection;
get images(): Images;
get parentSubDocument(): SubDocument | null;
get id(): number;
get type(): SubDocumentType;
get interval(): Interval;
get length(): number;
insertText(position: number, text: string): Interval;
insertLineBreak(position: number): Interval;
insertColumnBreak(position: number): Interval;
insertPageBreak(position: number): Interval;
insertSectionBreak(position: number, type: SectionBreakType): Section;
insertPicture(position: number, base64: string, size?: Size, callback?: (interval: Interval) => void): void;
insertParagraph(position: number): Paragraph;
insertHtml(position: number, htmlText: string, callback?: (interval: Interval) => void): void;
getHtml(interval?: IInterval): string;
insertRtf(position: number, rtfText: string, callback?: (interval: Interval, isRtfValid: boolean) => void): void;
getRtf(interval?: IInterval): string;
insertContent(position: number, content: string | File | Blob | ArrayBuffer, documentFormat: DocumentFormat, callback?: (interval: Interval, success: boolean) => void): void;
deleteText(interval: IInterval): void;
getText(interval?: IInterval): string;
getCharacterProperties(interval: IInterval): CharacterProperties;
setCharacterProperties(interval: IInterval, characterProperties: ICharacterProperties): void;
getParagraphProperties(interval: IInterval): ParagraphProperties;
setParagraphProperties(interval: IInterval, paragraphProperties: IParagraphProperties): void;
}
export class SubDocumentCollection<T extends SubDocument> extends Collection<T> {
get main(): T;
getById(id: number): T;
forEach(callback: (subDocument: T) => void): void;
}
export class SectionCollection extends Collection<Section> {
find(position: number): Section;
create(sectionBreakPosition: number, type: SectionBreakType): Section;
}
export class ListCollection extends Collection<List> {
create(type: ListType): List;
deleteNumeration(subDocument: SubDocument, interval: IInterval | number): void;
}
export class RichEditDocumentBase {
get fonts(): FontCollection;
get subDocuments(): SubDocumentCollection<SubDocument>;
get sections(): SectionCollection;
get bookmarks(): BookmarkCollection<Bookmark>;
get rangePermissions(): RangePermissionCollection;
get paragraphs(): ParagraphCollection;
get tables(): TableCollection;
get fields(): FieldCollection;
get hyperlinks(): HyperlinkCollection;
get lists(): ListCollection;
get length(): number;
get interval(): Interval;
get isProtected(): boolean;
protect(password: string): void;
unprotect(): void;
checkProtectionPassword(password: string): boolean;
insertText(position: number, text: string): Interval;
insertLineBreak(position: number): Interval;
insertColumnBreak(position: number): Interval;
insertPageBreak(position: number): Interval;
insertSectionBreak(position: number, type: SectionBreakType): Section;
insertPicture(position: number, base64: string, size?: Size, callback?: (interval: Interval) => void): void;
insertParagraph(position: number): Paragraph;
deleteText(interval: IInterval): void;
getText(interval?: Interval): string;
getCharacterProperties(interval: IInterval): CharacterProperties;
setCharacterProperties(interval: IInterval, characterProperties: ICharacterProperties): void;
getParagraphProperties(interval: IInterval): ParagraphProperties;
setParagraphProperties(interval: IInterval, paragraphProperties: IParagraphProperties): void;
getDefaultCharacterProperties(): CharacterProperties;
setDefaultCharacterProperties(characterProperties: ICharacterProperties): void;
}
export class BookmarkBase extends Bookmark {
goTo(): void;
}
export class BookmarkCollectionBase extends BookmarkCollection<BookmarkBase> {
}
export class SubDocumentBase extends SubDocument {
get bookmarks(): BookmarkCollectionBase;
}
export class SubDocumentCollectionBase extends SubDocumentCollection<SubDocumentBase> {
get main(): SubDocumentBase;
}
export class RichEditDocument extends RichEditDocumentBase {
get modified(): boolean;
set modified(value: boolean);
get subDocuments(): SubDocumentCollectionBase;
get bookmarks(): BookmarkCollectionBase;
get images(): Images;
setDefaultCharacterProperties(characterProperties: ICharacterProperties): void;
}
export class RichEditLayout {
get showHiddenSymbols(): boolean;
set showHiddenSymbols(value: boolean);
get showTableGridLines(): boolean;
set showTableGridLines(value: boolean);
}
export class RichEditSelection {
get activeSubDocument(): SubDocumentBase;
get anchor(): number;
get active(): number;
get start(): number;
get end(): number;
get intervals(): Interval[];
get showCursorAtEndOfLine(): boolean;
set showCursorAtEndOfLine(value: boolean);
setSelection(position: number | IInterval | IInterval[]): void;
selectAll(): void;
goToSubDocumentEnd(extendSelection?: boolean): void;
goToNextLine(extendSelection?: boolean): void;
goToLineEnd(extendSelection?: boolean): void;
goToLineStart(extendSelection?: boolean): void;
goToPreviousLine(extendSelection?: boolean): void;
goToNextCharacter(extendSelection?: boolean): void;
goToPreviousCharacter(extendSelection?: boolean): void;
selectLine(extendSelection?: boolean): void;
goToNextPage(extendSelection?: boolean): void;
goToPreviousPage(extendSelection?: boolean): void;
goToDocumentStart(extendSelection?: boolean): void;
goToDocumentEnd(extendSelection?: boolean): void;
goToNextWord(extendSelection?: boolean): void;
goToPreviousWord(extendSelection?: boolean): void;
goToParagraphStart(extendSelection?: boolean): void;
goToParagraphEnd(extendSelection?: boolean): void;
selectParagraph(): void;
goToNextPageStart(extendSelection?: boolean): void;
goToPreviousPageStart(extendSelection?: boolean): void;
selectTableCell(): void;
selectTableRow(): void;
selectTable(): void;
}
export class History {
beginTransaction(): void;
endTransaction(): void;
redo(): void;
undo(): void;
clear(): void;
}
export class UnitConverter {
pixelsToTwips(value: number): number;
inchesToTwips(value: number): number;
pointsToTwips(value: number): number;
centimetersToTwips(value: number): number;
twipsToCentimeters(value: number): number;
pixelsToCentimeters(value: number): number;
twipsToInches(value: number): number;
pixelsToInches(value: number): number;
pixelsToPoints(value: number): number;
twipsToPoints(value: number): number;
twipsToPixels(value: number): number;
}
export class MailMergeOptions {
getDataSource(): any;
setDataSource(dataSource: any, callback?: (success: boolean) => void): void;
get activeRecordIndex(): number;
set activeRecordIndex(value: number);
get viewMergedData(): boolean;
set viewMergedData(value: boolean);
}
export class AuthenticationOptions {
get userName(): string;
set userName(value: string);
get group(): string;
set group(value: string);
}
export interface IPaddings {
left: number;
right: number;
top: number;
bottom: number;
}
export class SimpleViewSettings {
get paddings(): IPaddings;
get fixedWidth(): number | undefined;
set paddings(paddings: IPaddings);
set fixedWidth(width: number | undefined);
}
export enum FileTabCommandId {
CreateDocument = 412,
OpenDocument = 410,
ExportDocument = 413,
DownloadDocumentMenu = 414,
DownloadDocx = 418,
DownloadRtf = 419,
DownloadTxt = 420,
DownloadHtml = 421,
PrintDocument = 416
}
export enum HomeTabCommandId {
ChangeCaseMenu = 431,
AlignParagraphMenu = 432,
LineSpacingMenu = 433,
Undo = 6,
Redo = 7,
Cut = 10,
Copy = 9,
Paste = 8,
ChangeFontName = 11,
ChangeFontSize = 13,
IncreaseFontSize = 14,
DecreaseFontSize = 15,
ChangeFontForeColor = 28,
ShowFontDialog = 52,
ToggleFontBold = 20,
ToggleFontItalic = 21,
ToggleFontUnderline = 22,
ToggleFontStrikeout = 24,
ToggleFontSubscript = 27,
ToggleFontSuperscript = 26,
CapitalizationSentenceCase = 207,
CapitalizationUpperCase = 16,
CapitalizationLowerCase = 17,
CapitalizeEachWordCase = 18,
CapitalizationToggleCase = 19,
ClearFormatting = 30,
ToggleBulletedList = 31,
ToggleNumberedList = 32,
ToggleMultilevelList = 33,
ToggleParagraphAlignmentLeft = 37,
ToggleParagraphAlignmentCenter = 38,
ToggleParagraphAlignmentRight = 39,
ToggleParagraphAlignmentJustify = 40,
ToggleShowHiddenSymbols = 36,
SetSingleParagraphSpacing = 41,
SetSesquialteralParagraphSpacing = 42,
SetDoubleParagraphSpacing = 43,
AddSpacingBeforeParagraph = 45,
AddSpacingAfterParagraph = 46,
RemoveSpacingBeforeParagraph = 47,
RemoveSpacingAfterParagraph = 48,
ChangeShading = 49,
ChangeStyle = 12,
Find = 50,
Replace = 51,
ChangeFontHighlightColor = 29,
ToggleFontDoubleUnderline = 23
}
export enum InsertTabCommandId {
ShowInsertTableDialog = 55,
InsertPicture = 411,
ShowBookmarkDialog = 58,
ShowHyperlinkDialog = 59,
InsertHeader = 220,
InsertFooter = 221,
InsertPageNumberField = 235,
InsertPageCountField = 236,
InsertFloatingTextBox = 368
}
export enum PageLayoutTabCommandId {
MarginsMenu = 434,
OrientationMenu = 435,
SizeMenu = 436,
ColumnsMenu = 437,
BreaksMenu = 438,
SetSectionNormalPageMargins = 66,
SetSectionNarrowPageMargins = 67,
SetSectionModeratePageMargins = 68,
SetSectionWidePageMargins = 69,
ShowMarginsPageSetupDialog = 70,
SetPortraitPageOrientation = 71,
SetLandscapePageOrientation = 72,
SetSectionLetterPaperSize = 162,
SetSectionLegalPaperSize = 99,
SetSectionFolioPaperSize = 100,
SetSectionA4PaperSize = 101,
SetSectionB5PaperSize = 104,
SetSectionExecutivePaperSize = 105,
SetSectionA5PaperSize = 102,
SetSectionA6PaperSize = 103,
ShowPageSetupDialog = 73,
SetSectionOneColumn = 74,
SetSectionTwoColumns = 75,
SetSectionThreeColumns = 76,
InsertPageBreak = 54,
InsertColumnBreak = 79,
InsertSectionBreakNextPage = 80,
InsertSectionBreakEvenPage = 81,
InsertSectionBreakOddPage = 82,
ChangePageColor = 90
}
export enum ReferencesTabCommandId {
AddTextMenu = 439,
InsertCaptionMenu = 440,
InsertTableOfFiguresMenu = 441,
InsertTableOfContents = 377,
SetParagraphBodyTextLevel = 385,
SetParagraphHeading1Level = 386,
SetParagraphHeading2Level = 387,
SetParagraphHeading3Level = 388,
SetParagraphHeading4Level = 389,
SetParagraphHeading5Level = 390,
SetParagraphHeading6Level = 391,
SetParagraphHeading7Level = 392,
SetParagraphHeading8Level = 393,
SetParagraphHeading9Level = 394,
CreateFigureCaptionField = 382,
CreateTableCaptionField = 383,
CreateEquationCaptionField = 381,
CreateTableOfFiguresField = 379,
CreateTableOfTablesField = 380,
CreateTableOfEquationsField = 378,
UpdateTableOfContents = 384
}
export enum MailMergeTabCommandId {
CreateFieldMenu = 442,
CreateField = 178,
CreateDateField = 203,
CreateTimeField = 204,
CreatePageField = 205,
CreateNumPagesField = 236,
CreateEmptyMergeField = 372,
CreateEmptyDocVariableField = 373,
CreateEmptyIfField = 459,
ShowInsertMergeFieldDialog = 214,
ToggleViewMergedData = 213,
ShowAllFieldCodes = 186,
ShowAllFieldResults = 187,
UpdateAllFields = 200,
GoToFirstDataRecord = 209,
GoToPreviousDataRecord = 210,
GoToNextDataRecord = 211,
GoToLastDataRecord = 212,
ShowMailMergeDialog = 216
}
export enum ViewTabCommandId {
SwitchToSimpleView = 405,
SwitchToPrintLayout = 406,
ToggleShowHorizontalRuler = 94,
ToggleFullScreen = 98
}
export enum HeaderAndFooterTabCommandId {
GoToPageHeader = 227,
GoToPageFooter = 228,
GoToPreviousPageHeaderFooter = 230,
GoToNextPageHeaderFooter = 229,
LinkHeaderFooterToPrevious = 222,
ToggleDifferentFirstPage = 231,
ToggleDifferentOddAndEvenPages = 232,
ChangeHeaderOffset = 330,
ChangeFooterOffset = 331,
CloseHeaderFooter = 233
}
export enum TableDesignTabCommandId {
TableStyleOptionsMenu = 443,
BordersMenu = 444,
ToggleFirstRow = 280,
ToggleLastRow = 281,
ToggleBandedRows = 284,
ToggleFirstColumn = 282,
ToggleLastColumn = 283,
ToggleBandedColumn = 285,
ChangeTableStyle = 269,
ChangeTableRepositoryItemBorderStyle = 292,
ChangeTableRepositoryItemBorderWidth = 291,
ChangeTableRepositoryItemBorderColor = 290,
ToggleTableCellsBottomBorder = 272,
ToggleTableCellsTopBorder = 270,
ToggleTableCellsLeftBorder = 273,
ToggleTableCellsRightBorder = 271,
ToggleTableCellNoBorder = 274,
ToggleTableCellAllBorders = 275,
ToggleTableCellOutsideBorders = 279,
ToggleTableCellInsideBorders = 276,
ToggleTableCellInsideHorizontalBorders = 277,
ToggleTableCellInsideVerticalBorders = 278,
ToggleTableViewGridlines = 295,
ChangeTableCellShading = 294
}
export enum TableLayoutTabCommandId {
SelectMenu = 445,
DeleteMenu = 446,
InsertMenu = 447,
AutoFitMenu = 448,
AlignmentMenu = 449,
SelectTableCell = 286,
SelectTableColumn = 287,
SelectTableRow = 288,
SelectTable = 289,
ToggleShowTableGridLines = 295,
ShowDeleteCellsDialog = 253,
DeleteTableColumns = 248,
DeleteTableRows = 247,
DeleteTable = 251,
InsertTableRowAbove = 246,
InsertTableRowBelow = 245,
InsertTableColumnToTheLeft = 243,
InsertTableColumnToTheRight = 244,
MergeTableCells = 254,
ShowSplitCellsDialog = 255,
SetAutoFitContents = 399,
SetAutoFitWindow = 400,
SetFixedColumnWidth = 401,
TableCellAlignTopLeft = 260,
TableCellAlignTopCenter = 261,
TableCellAlignTopRight = 262,
TableCellAlignMiddleLeft = 263,
TableCellAlignMiddleCenter = 264,
TableCellAlignMiddleRight = 265,
TableCellAlignBottomLeft = 266,
TableCellAlignBottomCenter = 267,
TableCellAlignBottomRight = 268
}
export enum FloatingObjectsFormatTabCommandId {
WrapTextMenu = 450,
PositionMenu = 451,
BringToFrontMenu = 452,
SendToBackMenu = 453,
ChangeFloatingObjectFillColor = 343,
ChangeFloatingObjectOutlineColor = 344,
ChangeFloatingObjectOutlineWidth = 345,
SetFloatingObjectInlineTextWrapType = 374,
SetFloatingObjectSquareTextWrapType = 346,
SetFloatingObjectTightTextWrapType = 347,
SetFloatingObjectThroughTextWrapType = 348,
SetFloatingObjectTopAndBottomTextWrapType = 349,
SetFloatingObjectBehindTextWrapType = 350,
SetFloatingObjectInFrontOfTextWrapType = 351,
SetFloatingObjectTopLeftAlignment = 352,
SetFloatingObjectTopCenterAlignment = 353,
SetFloatingObjectTopRightAlignment = 354,
SetFloatingObjectMiddleLeftAlignment = 355,
SetFloatingObjectMiddleCenterAlignment = 356,
SetFloatingObjectMiddleRightAlignment = 357,
SetFloatingObjectBottomLeftAlignment = 358,
SetFloatingObjectBottomCenterAlignment = 359,
SetFloatingObjectBottomRightAlignment = 360,
FloatingObjectBringForward = 361,
FloatingObjectBringToFront = 362,
FloatingObjectBringInFrontOfText = 363,
FloatingObjectSendBackward = 364,
FloatingObjectSendToBack = 365,
FloatingObjectSendBehindText = 366
}
export enum ContextMenuCommandId {
ApplySpellingSuggestion = 318,
NoSpellingSuggestions = 457,
IgnoreSpellingError = 314,
IgnoreAllSpellingErrors = 315,
AddWordToDictionary = 317,
OpenHyperlink = 195,
ShowEditHyperlinkDialog = 194,
RemoveHyperlink = 196,
UpdateField = 179,
ToggleFieldCodes = 180,
RestartNumberedList = 170,
ContinueNumberedList = 189,
Cut = 10,
Copy = 9,
Paste = 8,
TableMenu = 239,
InsertTableColumnToTheLeft = 243,
InsertTableColumnToTheRight = 244,
InsertTableRowAbove = 246,
InsertTableRowBelow = 245,
ShowInsertTableCellsDialog = 252,
ShowDeleteTableCellsDialog = 253,
ShowSplitCellsDialog = 255,
MergeTableCells = 254,
DecreaseParagraphIndent = 34,
IncreaseParagraphIndent = 35,
ShowFontDialog = 52,
ShowParagraphDialog = 53,
ShowBookmarkDialog = 58,
ShowHyperlinkDialog = 59,
ChangeFloatingObjectTextWrapTypeMenu = 454,
SetFloatingObjectInlineTextWrapType = 374,
SetFloatingObjectSquareTextWrapType = 346,
SetFloatingObjectTightTextWrapType = 347,
SetFloatingObjectThroughTextWrapType = 348,
SetFloatingObjectTopAndBottomTextWrapType = 349,
SetFloatingObjectBehindTextWrapType = 350,
SetFloatingObjectInFrontOfTextWrapType = 351,
FloatingObjectBringForwardMenu = 455,
FloatingObjectBringForward = 361,
FloatingObjectBringToFront = 362,
FloatingObjectBringInFrontOfText = 363,
FloatingObjectSendBackwardMenu = 456,
FloatingObjectSendBackward = 364,
FloatingObjectSendToBack = 365,
FloatingObjectSendBehindText = 366,
SelectAll = 106
}
export type CommandId = FileTabCommandId | HomeTabCommandId | InsertTabCommandId | PageLayoutTabCommandId | ReferencesTabCommandId | MailMergeTabCommandId | ViewTabCommandId | HeaderAndFooterTabCommandId | TableDesignTabCommandId | TableLayoutTabCommandId | FloatingObjectsFormatTabCommandId | ContextMenuCommandId;
export interface IContextMenuItemOptions {
text?: string;
localizationId?: string;
beginGroup?: boolean;
icon?: string;
disabled?: boolean;
visible?: boolean;
items?: ContextMenuItem[];
}
export class ContextMenuItem {
text: string;
localizationId?: string;
id: CommandId | string;
disabled: boolean;
visible: boolean;
beginGroup: boolean;
items?: ContextMenuItem[];
icon?: string;
constructor(id: CommandId | string, options: IContextMenuItemOptions);
}
export enum FileTabItemId {
CreateNewDocument = 412,
OpenDocument = 410,
ExportDocument = 413,
Download = 414,
DownloadDocx = 418,
DownloadRtf = 419,
DownloadTxt = 420,
DownloadHtml = 421,
PrintDocument = 416
}
export enum HomeTabItemId {
ChangeCaseMenu = 431,
AlignParagraphMenu = 432,
LineSpacingMenu = 433,
Undo = 6,
Redo = 7,
Cut = 10,
Copy = 9,
Paste = 8,
ChangeFontName = 11,
ChangeFontSize = 13,
IncreaseFontSize = 14,
DecreaseFontSize = 15,
ChangeFontForeColor = 28,
ChangeFontHighlightColor = 29,
ShowFontDialog = 52,
ToggleFontBold = 20,
ToggleFontItalic = 21,
ToggleFontUnderline = 22,
ToggleFontDoubleUnderline = 23,
ToggleFontStrikeout = 24,
ToggleFontSubscript = 27,
ToggleFontSuperscript = 26,
CapitalizationSentenceCase = 207,
CapitalizationUpperCase = 16,
CapitalizationLowerCase = 17,
CapitalizeEachWordTextCase = 18,
CapitalizationToggleCase = 19,
ClearFormatting = 30,
ToggleBulletedList = 31,
ToggleNumberedList = 32,
ToggleMultilevelList = 33,
ToggleParagraphAlignmentLeft = 37,
ToggleParagraphAlignmentCenter = 38,
ToggleParagraphAlignmentRight = 39,
ToggleParagraphAlignmentJustify = 40,
ToggleShowHiddenSymbols = 36,
SetSingleParagraphSpacing = 41,
SetSesquialteralParagraphSpacing = 42,
SetDoubleParagraphSpacing = 43,
AddSpacingBeforeParagraph = 45,
AddSpacingAfterParagraph = 46,
RemoveSpacingBeforeParagraph = 47,
RemoveSpacingAfterParagraph = 48,
ChangeParagraphBackColor = 49,
ChangeStyle = 12,
Find = 50,
Replace = 51
}
export enum InsertTabItemId {
ShowInsertTableDialog = 55,
InsertPictureLocally = 411,
ShowBookmarkDialog = 58,
ShowHyperlinkDialog = 59,
InsertHeader = 220,
InsertFooter = 221,
InsertPageNumberField = 235,
InsertPageCountField = 236,
InsertFloatingTextBox = 368
}
export enum PageLayoutTabItemId {
MarginsMenu = 434,
OrientationMenu = 435,
SizeMenu = 436,
ColumnsMenu = 437,
BreaksMenu = 438,
SetNormalSectionPageMargins = 66,
SetNarrowSectionPageMargins = 67,
SetModerateSectionPageMargins = 68,
SetWideSectionPageMargins = 69,
ShowMarginsPageSetupDialog = 70,
SetPortraitPageOrientation = 71,
SetLandscapePageOrientation = 72,
SetSectionLetterPaperSize = 162,
SetSectionLegalPaperSize = 99,
SetSectionFolioPaperSize = 100,
SetSectionA4PaperSize = 101,
SetSectionB5PaperSize = 104,
SetSectionExecutivePaperSize = 105,
SetSectionA5PaperSize = 102,
SetSectionA6PaperSize = 103,
ShowPaperPageSetupDialog = 73,
SetSectionOneColumn = 74,
SetSectionTwoColumns = 75,
SetSectionThreeColumns = 76,
InsertPageBreak = 54,
InsertColumnBreak = 79,
InsertSectionBreakNextPage = 80,
InsertSectionBreakEvenPage = 81,
InsertSectionBreakOddPage = 82,
ChangePageColor = 90
}
export enum ReferencesTabItemId {
AddTextMenu = 439,
InsertCaptionMenu = 440,
InsertTableOfFiguresMenu = 441,
InsertTableOfContents = 377,
SetParagraphBodyTextLevel = 385,
SetParagraphHeading1Level = 386,
SetParagraphHeading2Level = 387,
SetParagraphHeading3Level = 388,
SetParagraphHeading4Level = 389,
SetParagraphHeading5Level = 390,
SetParagraphHeading6Level = 391,
SetParagraphHeading7Level = 392,
SetParagraphHeading8Level = 393,
SetParagraphHeading9Level = 394,
CreateFigureCaptionField = 382,
CreateTableCaptionField = 383,
CreateEquationCaptionField = 381,
CreateTableOfFiguresField = 379,
CreateTableOfTablesField = 380,
CreateTableOfEquationsField = 378,
UpdateTableOfContents = 384
}
export enum MailMergeTabItemId {
CreateFieldMenu = 442,
CreateField = 178,
CreateDateField = 203,
CreateTimeField = 204,
CreatePageField = 205,
CreateNumPagesField = 236,
CreateEmptyMergeField = 372,
CreateEmptyDocVariableField = 373,
CreateEmptyIfField = 459,
ShowInsertMergeFieldDialog = 214,
ToggleViewMergedData = 213,
ShowAllFieldCodes = 186,
ShowAllFieldResults = 187,
UpdateAllFields = 200,
GoToFirstDataRecord = 209,
GoToPreviousDataRecord = 210,
GoToNextDataRecord = 211,
GoToLastDataRecord = 212,
ShowMailMergeDialog = 216
}
export enum ViewTabItemId {
SwitchToSimpleView = 405,
SwitchToPrintLayout = 406,
ToggleShowHorizontalRuler = 94,
ToggleFullScreen = 98
}
export enum HeaderAndFooterTabItemId {
GoToPageHeader = 227,
GoToPageFooter = 228,
GoToPreviousPageHeaderFooter = 230,
GoToNextPageHeaderFooter = 229,
LinkHeaderFooterToPrevious = 222,
ToggleDifferentFirstPage = 231,
ToggleDifferentOddAndEvenPages = 232,
ChangeHeaderOffset = 330,
ChangeFooterOffset = 331,
ClosePageHeaderFooter = 233
}
export enum TableDesignTabItemId {
TableStyleOptionsMenu = 443,
BordersMenu = 444,
ToggleFirstRow = 280,
ToggleLastRow = 281,
ToggleBandedRows = 284,
ToggleFirstColumn = 282,
ToggleLastColumn = 283,
ToggleBandedColumn = 285,
ApplyTableStyle = 269,
ChangeTableBorderStyleRepositoryItem = 292,
ChangeTableBorderWidthRepositoryItem = 291,
ChangeTableBorderColorRepositoryItem = 290,
ToggleTableCellsBottomBorder = 272,
ToggleTableCellsTopBorder = 270,
ToggleTableCellsLeftBorder = 273,
ToggleTableCellsRightBorder = 271,
ToggleTableCellNoBorder = 274,
ToggleTableCellAllBorders = 275,
ToggleTableCellOutsideBorders = 279,
ToggleTableCellInsideBorders = 276,
ToggleTableCellInsideHorizontalBorders = 277,
ToggleTableCellInsideVerticalBorders = 278,
ToggleShowTableGridLines = 295,
ChangeTableCellShading = 294
}
export enum TableLayoutTabItemId {
SelectMenu = 445,
DeleteMenu = 446,
InsertMenu = 447,
AutoFitMenu = 448,
AlignmentMenu = 449,
SelectTableCell = 286,
SelectTableColumn = 287,
SelectTableRow = 288,
SelectTable = 289,
ToggleShowTableGridLines = 295,
ShowDeleteTableCellsDialog = 253,
DeleteTableColumns = 248,
DeleteTableRows = 247,
DeleteTable = 251,
InsertTableRowAbove = 246,
InsertTableRowBelow = 245,
InsertTableColumnToTheLeft = 243,
InsertTableColumnToTheRight = 244,
MergeTableCells = 254,
ShowSplitTableCellsDialog = 255,
SetAutoFitContents = 399,
SetAutoFitWindow = 400,
SetFixedColumnWidth = 401,
TableCellAlignTopLeft = 260,
TableCellAlignTopCenter = 261,
TableCellAlignTopRight = 262,
TableCellAlignMiddleLeft = 263,
TableCellAlignMiddleCenter = 264,
TableCellAlignMiddleRight = 265,
TableCellAlignBottomLeft = 266,
TableCellAlignBottomCenter = 267,
TableCellAlignBottomRight = 268
}
export enum FloatingObjectsFormatTabItemId {
WrapTextMenu = 450,
PositionMenu = 451,
BringForwardMenu = 452,
SendBackwardMenu = 453,
ChangeFloatingObjectFillColor = 343,
ChangeFloatingObjectOutlineColor = 344,
ChangeFloatingObjectOutlineWidth = 345,
SetFloatingObjectInlineTextWrapType = 374,
SetFloatingObjectSquareTextWrapType = 346,
SetFloatingObjectTightTextWrapType = 347,
SetFloatingObjectThroughTextWrapType = 348,
SetFloatingObjectTopAndBottomTextWrapType = 349,
SetFloatingObjectBehindTextWrapType = 350,
SetFloatingObjectInFrontOfTextWrapType = 351,
SetFloatingObjectTopLeftAlignment = 352,
SetFloatingObjectTopCenterAlignment = 353,
SetFloatingObjectTopRightAlignment = 354,
SetFloatingObjectMiddleLeftAlignment = 355,
SetFloatingObjectMiddleCenterAlignment = 356,
SetFloatingObjectMiddleRightAlignment = 357,
SetFloatingObjectBottomLeftAlignment = 358,
SetFloatingObjectBottomCenterAlignment = 359,
SetFloatingObjectBottomRightAlignment = 360,
FloatingObjectBringForward = 361,
FloatingObjectBringToFront = 362,
FloatingObjectBringInFrontOfText = 363,
FloatingObjectSendBackward = 364,
FloatingObjectSendToBack = 365,
FloatingObjectSendBehindText = 366
}
export type RibbonItemId = string | FileTabItemId | HomeTabItemId | InsertTabItemId | PageLayoutTabItemId | ReferencesTabItemId | MailMergeTabItemId | ViewTabItemId | HeaderAndFooterTabItemId | TableDesignTabItemId | TableLayoutTabItemId | FloatingObjectsFormatTabItemId;
export interface IContextMenu {
enabled: boolean;
items: ContextMenuItem[];
getItem(id: CommandId | RibbonItemId): ContextMenuItem | null;
removeItem(item: ContextMenuItem): ContextMenuItem | null;
removeItem(id: CommandId | RibbonItemId): ContextMenuItem | null;
insertItem(item: ContextMenuItem, index?: number): ContextMenuItem;
insertItemBefore(item: ContextMenuItem, target: ContextMenuItem | CommandId | RibbonItemId): ContextMenuItem;
insertIte