UNPKG

@mikezimm/fps-core-v7

Version:

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

35 lines 2.08 kB
import { IAnySourceItemAny } from "../../AnyContent/IAnyContent"; export declare const imgSrcRegex: RegExp; /** * 2024-12-31: Migrated from fps-library-v2: * * import { reverseStylesStringQuotesm, getModernHumanReadable, getCanvaseWebPartsFromContent } from "@mikezimm/fps-core-v7/lib/components/molecules/ModernPages/functions/processModernContent"; * * reverseStylesStringQuotes will take the WebPart Styles css and fix all the double quotes so it can actually be parsed. * Without this, you can not parse the html. * * Looks for strings like this: * "pageInfoStyle":""paddingBottom":"20px","backgroundColor":"#dcdcdc";"borderLeft":"solid 3px #c4c4c4"","bannerStyleChoice": * * and converts to strings like this: * "pageInfoStyle":"'paddingBottom':'20px','backgroundColor':'#dcdcdc';'borderLeft':'solid 3px #c4c4c4'","bannerStyleChoice": * @param str * @returns */ export declare function reverseStylesStringQuotes(str: string): string; /** * This will take Modern Page and convert CanvasContent1 into more human readable version. * The goal is to make it easier to debug and see what is in the HTML replacing all special characters and entites with actual characters. * * Example of CanvaseCotnent1: Contents","tocExpanded":true,"minHeadingToShow":"h3","pageInfoStyle":" * \"paddingBottom\":\"20px\",\"backgroundColor\":\"#dcdcdc\";\"borderLeft\":\"solid 3px #c4c4c4\"",&qu * * TO: * "tocExpanded":true,"minHeadingToShow":"h3","pageInfoStyle":""paddingBottom":"20px","backgroundColor":"#dcdcdc";"borderLeft":"solid 3px #c4c4c4"","bannerStyleChoice":"corpDark1","bannerStyle":"{"color":"white","backgroundColor":"#005495", * * @param result * @returns */ export declare function getModernHumanReadable(result: IAnySourceItemAny): IAnySourceItemAny; export declare function getCanvaseWebPartsFromContent(part: string): string; //# sourceMappingURL=processModernContent.d.ts.map