UNPKG

kentico-cloud-delivery

Version:

Official Kentico Cloud Delivery SDK

43 lines (42 loc) 1.51 kB
import { IItemQueryConfig } from '../interfaces'; import { ContentItem, Link, TypeResolver } from '../models'; import { IRichTextHtmlParser } from '../parser'; export declare class RichTextResolver { /** * Type identifying nested modular content in Rich text fields */ private readonly modularContentobjectType; /** * This tag wil be used instead of 'object' */ private readonly modularContentTagWrapper; /** * Attribute used to identify modular item based on its codename */ private readonly modularContentCodenameAttributeName; /** * Tag identifying links */ private readonly linkTag; /** * Attributes that identifies if of the content item referenced in links */ private readonly linkContentItemIdAttributeName; /** * Resolves modular content inside the Rich text field. * Rich text resolved needs to be configured either on the model or query level */ resolveHtml(html: string, data: { richTextHtmlParser: IRichTextHtmlParser; typeResolvers: TypeResolver[]; modularItems: ContentItem[]; links: Link[]; enableAdvancedLogging: boolean; queryConfig: IItemQueryConfig; modularContentWrapperTag: string; modularContentWrapperClasses: string[]; }): string; private getHtmlOfModularContent(data); private getLinkUrl(data); } export declare const richTextResolver: RichTextResolver;