@syncfusion/ej2-documenteditor
Version:
Feature-rich document editor control with built-in support for context menu, options pane and dialogs.
61 lines (60 loc) • 2.35 kB
TypeScript
import { L10n } from '@syncfusion/ej2-base';
import { DocumentEditor } from '../../document-editor/index';
import { RibbonGalleryItemModel } from '@syncfusion/ej2-ribbon';
/**
* Helper class for style operations in Document Editor
* @private
*/
export declare class StylesHelper {
/**
* Get style items for gallery
*
* @param {DocumentEditor} documentEditor - Document editor instance
* @param {L10n} localObj - Localization object
* @returns {RibbonGalleryItemModel[]} Array of style gallery items
*/
static getStyleItems(documentEditor: DocumentEditor, localObj: L10n): RibbonGalleryItemModel[];
private static createStyleMaps;
private static addDefaultStyles;
private static addRemainingStyles;
/**
* Get the current style name from selection
*
* @param {DocumentEditor} documentEditor - Document editor instance
* @returns {string} The current style name
*/
static getCurrentStyleName(documentEditor: DocumentEditor, localObj: L10n): string;
/**
* Find the index of a style in the gallery items
*
* @param {string} styleName - Style name to find
* @param {RibbonGalleryItemModel[]} items - Gallery items array
* @returns {number} Index of the style or -1 if not found
*/
static findStyleIndex(styleName: string, items: RibbonGalleryItemModel[]): number;
/**
* Apply a style to the document
*
* @param {DocumentEditor} documentEditor - Document editor instance
* @param {string} styleName - Style name to apply
* @returns {void}
*/
static applyStyle(documentEditor: DocumentEditor, styleName: string): void;
/**
* Update style names in ComboBox
*
* @param {DocumentEditor} documentEditor - Document editor instance
* @param {any} style - ComboBox instance
* @param {L10n} localObj - Localization object
* @returns {string} Current style name
*/
static updateStyleNames(documentEditor: DocumentEditor, style: any, localObj: L10n): string;
/**
* Apply style value from ComboBox selection
*
* @param {DocumentEditor} documentEditor - Document editor instance
* @param {any} args - ComboBox change event arguments
* @returns {void}
*/
static applyStyleValue(documentEditor: DocumentEditor, args: any): void;
}