@syncfusion/ej2-richtexteditor
Version:
Essential JS 2 RichTextEditor component
183 lines (181 loc) • 6.61 kB
TypeScript
import { BaseToolbar } from '../actions/base-toolbar';
import { ServiceLocator } from '../services/service-locator';
import { IRichTextEditor } from '../base/interface';
import { ISetToolbarStatusArgs } from './interface';
import { IToolbarItems, IDropDownItemModel, IToolbarItemModel, IToolsItemConfigs } from '../../common/interface';
/**
* @param {string} val - specifies the string value
* @param {string} items - specifies the value
* @returns {number} - returns the number value
* @hidden
*/
export declare function getIndex(val: string, items: (string | IToolbarItems)[]): number;
/**
* @param {Element} element - specifies the element
* @param {string} className - specifies the string value
* @returns {boolean} - returns the boolean value
* @hidden
*/
export declare function hasClass(element: Element | HTMLElement, className: string): boolean;
/**
* @param {IDropDownItemModel} items - specifies the item model
* @param {string} value - specifies the string value
* @param {string} type - specifies the string value
* @param {string} returnType - specifies the return type
* @returns {string} - returns the string value
* @hidden
*/
export declare function getDropDownValue(items: IDropDownItemModel[], value: string, type: string, returnType: string): string;
/**
* @param {string} value - specifies the value
* @returns {string} - returns the string value
* @hidden
*/
export declare function getFormattedFontSize(value: string): string;
/**
* @param {MouseEvent} e - specifies the mouse event
* @param {HTMLElement} parentElement - specifies the parent element
* @param {boolean} isIFrame - specifies the boolean value
* @returns {number} - returns the number
* @hidden
*/
export declare function pageYOffset(e: MouseEvent | Touch, parentElement: HTMLElement, isIFrame: boolean): number;
/**
* @param {string} item - specifies the string
* @param {ServiceLocator} serviceLocator - specifies the service locator
* @returns {string} - returns the string
* @hidden
*/
export declare function getTooltipText(item: string, serviceLocator: ServiceLocator): string;
/**
* @param {ISetToolbarStatusArgs} e - specifies the e element
* @param {boolean} isPopToolbar - specifies the boolean value
* @param {IRichTextEditor} self - specifies the parent element
* @returns {void}
* @hidden
*/
export declare function setToolbarStatus(e: ISetToolbarStatusArgs, isPopToolbar: boolean, self: IRichTextEditor): void;
/**
* @param {string} items - specifies the string value
* @returns {string[]} - returns the array value
* @hidden
*/
export declare function getCollection(items: string | string[]): string[];
/**
* @param {any} dropDown - The dropdown button instance.
* @param {string} htmlString - The HTML content to update.
* @returns {void}
* @hidden
*/
export declare function updateDropdownContent(dropDown: any, htmlString: string): void;
/**
* @param {string[]} items - specifies the array of string value
* @param {IToolbarItemModel} toolbarItems - specifies the tool bar model
* @returns {number} - returns the number
* @hidden
*/
export declare function getTBarItemsIndex(items: string[], toolbarItems: IToolbarItemModel[]): number[];
/**
* @param {BaseToolbar} baseToolbar - specifies the base
* @param {boolean} undoRedoStatus - specifies the boolean value
* @returns {void}
* @hidden
*/
export declare function updateUndoRedoStatus(baseToolbar: BaseToolbar, undoRedoStatus: {
[key: string]: boolean;
}): void;
/**
* To dispatch the event manually
*
* @param {Element} element - specifies the element.
* @param {string} type - specifies the string type.
* @returns {void}
* @hidden
*/
export declare function dispatchEvent(element: Element | HTMLDocument, type: string): void;
/**
* To parse the HTML
*
* @param {string} value - specifies the string value
* @returns {DocumentFragment} - returns the document
* @hidden
*/
export declare function parseHtml(value: string): DocumentFragment;
/**
* @param {Document} docElement - specifies the document element
* @param {Element} node - specifies the node
* @returns {Node[]} - returns the node array
* @hidden
*/
export declare function getTextNodesUnder(docElement: Document, node: Element): Node[];
/**
* @param {IToolsItemConfigs} obj - specifies the configuration
* @returns {void}
* @hidden
*/
export declare function toObjectLowerCase(obj: {
[key: string]: IToolsItemConfigs;
}): {
[key: string]: IToolsItemConfigs;
};
/**
* @param {string} value - specifies the string value
* @param {IRichTextEditor} rteObj - specifies the rte object
* @returns {string} - returns the string
* @hidden
*/
export declare function getEditValue(value: string, rteObj: IRichTextEditor): string;
/**
* @param {string} value - specifies the value
* @param {IRichTextEditor} rteObj - specifies the rich text editor instance.
* @returns {string} - returns the string
* @hidden
*/
export declare function formatRTEContent(value: string, rteObj?: IRichTextEditor): string;
/**
* @param {IRichTextEditor} rteObj - specifies the rte object
* @returns {string} - returns the value based on enter configuration.
* @hidden
*/
export declare function getDefaultValue(rteObj: IRichTextEditor): string;
/**
* @param {string} value - specifies the value
* @returns {boolean} - returns the boolean value
* @hidden
*/
export declare function isEditableValueEmpty(value: string): boolean;
/**
* @param {string} value - specifies the string value
* @returns {string} - returns the string
* @hidden
*/
export declare function decode(value: string): string;
/**
* @param {string} value - specifies the string value
* @param {IRichTextEditor} parent - specifies the rte
* @returns {string} - returns the string value
* @hidden
*/
export declare function sanitizeHelper(value: string, parent: IRichTextEditor): string;
/**
* @param {string} value - specifies the string value
* @returns {string} - returns the string value
* @hidden
*/
export declare function parseHelper(value: string): string;
/**
* @param {IRichTextEditor} self - specifies the rte
* @param {string} localeItems - specifies the locale items
* @param {IDropDownItemModel} item - specifies the dropdown item
* @returns {string} - returns the value
* @hidden
*/
export declare function getLocaleFontFormat(self: IRichTextEditor, localeItems: {
[ket: string]: string;
}[], item: IDropDownItemModel): string;
/**
* @param {IRichTextEditor} self - specifies the rte
* @returns {void}
* @hidden
*/
export declare function updateDropDownFontFormatLocale(self: IRichTextEditor): void;