UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

78 lines (77 loc) 4.13 kB
import { CharacterStyle } from './character/character-style'; import { DocumentModel } from './document-model'; import { NumberingListStyle } from './numbering-lists/numbering-list-style'; import { ParagraphStyle } from './paragraph/paragraph-style'; import { TableCellStyle } from './tables/styles/table-cell-style'; import { TableStyle } from './tables/styles/table-style'; export type StyleGalleryItem = { value: string; text: string; data: string; }; export declare class StylesManager { static characterPrefix: string; static paragraphPrefix: string; static characterStylesGalleryTitle: string; static paragraphStylesGalleryTitle: string; static tableStylesGalleryTitle: string; characterAndParagraphStyleGalleryItems: [StyleGalleryItem[], StyleGalleryItem[]]; documentModel: DocumentModel; characterStyleNameToIndex: Record<string, number>; paragraphStyleNameToIndex: Record<string, number>; numberingListStyleNameToIndex: Record<string, number>; tableStyleNameToIndex: Record<string, number>; tableCellStyleNameToIndex: Record<string, number>; private defaultCharacterStyle; private defaultParagraphStyle; static presetStylesLocalizedNames: Record<string, number>; static presetCharacterStyleNameToIndex: Record<string, number>; static presetParagraphStyleNameToIndex: Record<string, number>; static presetTableStyleNameToIndex: Record<string, number>; static presetCharacterStyles: CharacterStyle[]; static presetParagraphStyles: ParagraphStyle[]; static presetTableStyles: TableStyle[]; constructor(documentModel: DocumentModel); static isParagraphStyle(styleNameWithPrefix: string): boolean; static getStyleNameWithoutPrefix(styleName: string): string; initCharacterAndParagraphStyleGalleryItems(): void; registerLink(characterStyle: CharacterStyle, paragraphStyle: ParagraphStyle): void; unregisterLink(characterStyle: CharacterStyle, paragraphStyle: ParagraphStyle): void; getCharacterStyleByName(styleName: string): CharacterStyle; getParagraphStyleByName(styleName: string): ParagraphStyle; getNumberingListStyleByName(styleName: string): NumberingListStyle; getTableStyleByName(styleName: string): TableStyle; getTableCellStyleByName(styleName: string): TableCellStyle; getDefaultCharacterStyle(): CharacterStyle; getDefaultParagraphStyle(): ParagraphStyle; getDefaultTableStyle(): TableStyle; getDefaultTableCellStyle(): TableCellStyle; addCharacterStyle(style: CharacterStyle): CharacterStyle; registerCharacterStyle(style: CharacterStyle): void; removeLastStyle(): void; addParagraphStyle(style: ParagraphStyle): ParagraphStyle; registerParagraphStyle(style: ParagraphStyle): void; addTableStyle(style: TableStyle): TableStyle; registerTableStyle(style: TableStyle): void; addTableCellStyle(style: TableCellStyle): TableCellStyle; private addTableStyleCore; private addTableCellStyleCore; private cloneTableConditionalStyle; private addCharacterStyleCore; private addParagraphStyleCore; private getDefaultStyleCore; static getPresetCharacterStyleLocalizedName(styleName: string): string; static getPresetParagraphStyleLocalizedName(styleName: string): string; static getPresetTableStyleLocalizedName(styleName: string): string; static getPresetCharacterStyleByName(styleName: string, ignoreCase?: boolean): CharacterStyle; static getPresetParagraphStyleByName(styleName: string, ignoreCase?: boolean): ParagraphStyle; static getPresetTableStyleByName(styleName: string, ignoreCase?: boolean): TableStyle; static populateGalleryHeaders(container: any): void; static populatePresetStyles(stylesContainer: any): void; private static populatePresetCharacterStyles; private static populatePresetParagraphStyles; private static populatePresetTableStyles; private static getStyleByNameCore; private static compareNames; clone(documentModel: DocumentModel): StylesManager; }