UNPKG

@kontent-ai/smart-link

Version:

Kontent.ai Smart Link SDK allowing to automatically inject [smart links](https://docs.kontent.ai/tutorials/develop-apps/build-strong-foundation/set-up-editing-from-preview#a-using-smart-links) to Kontent.ai according to manually specified [HTML data attri

21 lines (20 loc) 1 kB
import { KSLConfiguration } from './configuration'; /** * Find all descendant HTML elements that could be augmented (have highlights or add buttons near them). * * @param {HTMLElement | Document} node * @returns {NodeListOf<HTMLElement>} */ export declare function getAugmentableDescendants(node: HTMLElement | Document, configuration: KSLConfiguration): NodeListOf<HTMLElement>; /** * Checks if HTML element could be augmented (have highlights or add buttons near them). */ export declare function isElementAugmentable(element: HTMLElement | null, configuration: KSLConfiguration): boolean; /** * Check if node should have highlights based on its data-attributes. */ export declare function shouldElementHaveHighlight(element: HTMLElement | null, configuration: KSLConfiguration): boolean; /** * Check if node should have a add button based on its data-attributes. */ export declare function shouldElementHaveAddButton(element: HTMLElement | null, configuration: KSLConfiguration): boolean;