burdy-web-utils
Version:
Utility library for web
40 lines (39 loc) • 1.63 kB
TypeScript
/**
* Function will return HTML tag for a block.
*/
export declare function getBlockTag(type: any): any;
/**
* Function will return style string for a block.
*/
export declare function getBlockStyle(data: any): string;
/**
* The function will return inline style applicable at some offset within a block.
*/
export declare function getStylesAtOffset(inlineStyles: any, offset: any): any;
/**
* Function returns html for text depending on inline style tags applicable to it.
*/
export declare function addInlineStyleMarkup(style: any, content: any): any;
/**
* Function returns true for a set of styles if the value of these styles at an offset
* are same as that on the previous offset.
*/
export declare function sameStyleAsPrevious(inlineStyles: any, styles: any, index: any): boolean;
/**
* Replace leading blank spaces by
*/
export declare function trimLeadingZeros(sectionText: any): any;
/**
* Replace trailing blank spaces by
*/
export declare function trimTrailingZeros(sectionText: any): any;
/**
* Function will return the markup for block preserving the inline styles and
* special characters like newlines or blank spaces.
*/
export declare function getBlockInnerMarkup(block: any, entityMap: any, hashtagConfig: any, customEntityTransform: any): string;
/**
* Function will return html for the block.
*/
export declare function getBlockMarkup(block: any, entityMap: any, hashtagConfig: any, directional: any, customEntityTransform: any): string;
export declare const richtextToHtml: (editorContent: any, hashtagConfig?: any, directional?: any, customEntityTransform?: any) => string;