@syncfusion/ej2-documenteditor
Version:
Feature-rich document editor control with built-in support for context menu, options pane and dialogs.
58 lines (57 loc) • 2.55 kB
TypeScript
import { DocumentEditor, BorderSettings, BorderType } from '../../document-editor/index';
import { L10n } from '@syncfusion/ej2-base';
/**
* Helper class for border operations in Document Editor
* @private
*/
export declare class BordersHelper {
/**
* Get border settings based on border type and properties
* @param {BorderType} borderType - The type of border to apply
* @param {string} borderColor - The color of the border
* @param {string | number} borderWidth - The width of the border
* @returns {BorderSettings} BorderSettings object for the specified border type
*/
static getBorderSettings(borderType: BorderType, borderColor: string, borderWidth: string | number): BorderSettings;
/**
* Apply border to the document
* @param {DocumentEditor} documentEditor - Document editor instance
* @param {BorderType} borderType - The type of border to apply
* @param {string} borderColor - The color of the border
* @param {string | number} borderWidth - The width of the border
* @returns {void}
*/
static applyBorder(documentEditor: DocumentEditor, borderType: BorderType, borderColor: string, borderWidth: string | number): void;
/**
* Gets the border type based on the localized text
* @param {string} text The localized text of the border type
* @param {L10n} localObj The localization object
* @returns {BorderType} The border type
*/
static getBorderType(text: string, localObj: L10n): BorderType;
/**
* Creates a dropdown option for border width
* @param {HTMLElement} ulTag - The ul element to append the option to
* @param {string} text - The text for the option
* @param {L10n} localObj - Localization object
* @returns {HTMLElement} The created li element
*/
static createBorderWidthOption(ulTag: HTMLElement, text: string, localObj: L10n): HTMLElement;
/**
* Get border width items
* @param {L10n} localObj - Localization object
* @returns {string[]} Array of border width items
*/
static getBorderWidthItems(localObj: L10n): string[];
/**
* Get border dropdown items
* @param {L10n} localObj - Localization object
* @param {commonId} commonId - Common ID for dropdown items}
* @returns {Array<{text: string, id: string, iconCss: string}>} Array of border dropdown items
*/
static getBorderDropdownItems(localObj: L10n, commonId: string): Array<{
text: string;
id: string;
iconCss: string;
}>;
}