UNPKG

@mikezimm/fps-core-v7

Version:

Library of reusable core interfaces, types and constants migrated from fps-library-v2

44 lines (43 loc) 2.03 kB
/** * Creation of string from HTML entities * * Used first in ALVFinMan for reading CanvasContent1 in Modern Pages */ export declare function convertHTMLToJSONv2(str: string, conversions?: IFPSHtmlConvert[]): string; /** * This can take SharePoint html content ( like from ModernPage CanvasContent1 field and make it `readable` ) * * 2023-11-24: POTENTIAL BREAKING CHANGE: when changing to: logic/Strings/htmlV2 - * https://github.com/mikezimm/PageInfo/issues/144 * DOES NOT find image links in src\components\molecules\RelatedItems\GetItems.ts * Update: After updating conversons loop to correctly apply RegExp replace (not text version), works. * Also had to change the order of the quot and apos regex to do the double slash ones first * TESTED in PageInfo (GetItems.ts) * * @param str * @returns */ export declare function replaceHTMLEntitiesv2(str: string, conversions?: IFPSHtmlConvert[]): string; export interface IFPSHtmlConvert { regex: RegExp[]; human: string; charEntity: string; numEntity: string; } export declare const HtmlCurleyLeft: IFPSHtmlConvert; export declare const HtmlCurleyRight: IFPSHtmlConvert; export declare const HtmlDoubleQuote: IFPSHtmlConvert; export declare const HtmlSingleQuote: IFPSHtmlConvert; export declare const HtmlColon: IFPSHtmlConvert; export declare const HtmlSpace: IFPSHtmlConvert; export declare const HtmlLessThan: IFPSHtmlConvert; export declare const HtmlGreaterThan: IFPSHtmlConvert; export declare const HtmlApmersand: IFPSHtmlConvert; export declare const HtmlLQuestion: IFPSHtmlConvert; export declare const HtmlParenthRight: IFPSHtmlConvert; export declare const HtmlParenthLeft: IFPSHtmlConvert; export declare const HtmlForwardSlash: IFPSHtmlConvert; export declare const OriginalHTMLConversions: IFPSHtmlConvert[]; export declare const AdditionalHTMLConversions: IFPSHtmlConvert[]; export declare const AllHTMLConversions: IFPSHtmlConvert[]; //# sourceMappingURL=htmlV2.d.ts.map