UNPKG

@syncfusion/ej2-documenteditor

Version:

Feature-rich document editor control with built-in support for context menu, options pane and dialogs.

110 lines (109 loc) 4.7 kB
import { L10n } from '@syncfusion/ej2-base'; import { DocumentEditor, ListLevelPattern } from '../../document-editor/index'; import { ElementsMap, ListStyle } from './ribbon-interfaces'; /** * Helper class for bullet list operations in Document Editor * @private */ export declare class BulletListHelper { static readonly BULLET_STYLES: { DOT: ListStyle; CIRCLE: ListStyle; SQUARE: ListStyle; FLOWER: ListStyle; ARROW: ListStyle; TICK: ListStyle; }; /** * Creates a bullet list tag item for the dropdown * * @param {HTMLElement} ulTag - Parent UL element * @param {string} iconCss - CSS class for the icon * @param {boolean} isNone - Whether this is the "None" option * @param {L10n} localObj - Localization object * @returns {HTMLElement} The created list item element */ static createBulletListTag(ulTag: HTMLElement, iconCss: string, isNone: boolean, localObj: L10n): HTMLElement; /** * Creates a number list tag item for the dropdown * @param {HTMLElement} ulTag - Parent UL element * @param {string} text1 - First number format text * @param {string} text2 - Second number format text * @param {string} text3 - Third number format text * @returns {HTMLElement} The created list item element */ static createNumberListTag(ulTag: HTMLElement, text1: string, text2: string, text3: string): HTMLElement; /** * Creates a number none list tag item for the dropdown * @param {HTMLElement} ulTag - Parent UL element * @param {L10n} localObj - Localization object * @returns {HTMLElement} The created list item element */ static createNumberNoneListTag(ulTag: HTMLElement, localObj: L10n): HTMLElement; /** * Update the selected bullet list type in the dropdown * @param {string} listText - The list text to match * @param {ElementsMap} bulletElements - Map of bullet elements * @returns {void} */ static updateSelectedBulletListType(listText: string, bulletElements: ElementsMap): void; /** * Update the selected numbered list type in the dropdown * @param {string} listText - The list pattern to match * @param {ElementsMap} numberElements - Map of number elements * @returns {void} */ static updateSelectedNumberedListType(listText: string, numberElements: ElementsMap): void; /** * Remove selected class from all list items * @param {ElementsMap} elements - Map of elements to remove selection from * @returns {void} */ static removeSelectedList(elements: ElementsMap): void; /** * Get the level format for numbering * @param {DocumentEditor} documentEditor - Document editor instance * @returns {string} The level format string */ static getLevelFormatNumber(documentEditor: DocumentEditor): string; /** * Apply bullet style to the document * @param {DocumentEditor} documentEditor - Document editor instance * @param {string} style - Bullet style name * @param {Object} appliedBulletStyle - Reference to store the applied style * @param {string} appliedBulletStyle.value - The value to store the applied style * @returns {void} */ static applyBulletStyle(documentEditor: DocumentEditor, style: string, appliedBulletStyle: { value: string; }): void; /** * Clear the list formatting * @param {DocumentEditor} documentEditor - Document editor instance * @returns {void} */ static clearList(documentEditor: DocumentEditor): void; /** * Apply numbering with specified format * @param {DocumentEditor} documentEditor - Document editor instance * @param {ListLevelPattern} pattern - Numbering pattern * @param {Object} appliedNumberingStyle - Reference to store the applied style * @param {string} appliedNumberingStyle.value - The value to store the applied style * @returns {void} */ static applyNumbering(documentEditor: DocumentEditor, pattern: ListLevelPattern, appliedNumberingStyle: { value: string; }): void; /** * Get the current list pattern from selection * @param {DocumentEditor} documentEditor - Document editor instance * @returns {string} The current list pattern or 'None' if no list */ static getCurrentListPattern(documentEditor: DocumentEditor): string; /** * Get the current list text from selection * @param {DocumentEditor} documentEditor - Document editor instance * @returns {string} The current list text */ static getCurrentListText(documentEditor: DocumentEditor): string; }