@contentstack/live-preview-utils
Version:
Contentstack provides the Live Preview SDK to establish a communication channel between the various Contentstack SDKs and your website, transmitting live changes to the preview pane.
20 lines (17 loc) • 771 B
TypeScript
import { CslpData } from './types/cslp.types.js';
/**
* Extracts details from a CSLP value string.
* @param cslpValue The CSLP value string to extract details from.
* @returns An object containing the extracted details.
*/
declare function extractDetailsFromCslp(cslpValue: string): CslpData;
/**
* Adds an outline to the clicked element and triggers a callback function.
* @param e - The MouseEvent object representing the click event.
* @param callback - An optional callback function that will be called with the CSLP tag and highlighted element as arguments.
*/
declare function addCslpOutline(e: MouseEvent, callback?: (args: {
cslpTag: string;
highlightedElement: HTMLElement;
}) => void): void;
export { addCslpOutline, extractDetailsFromCslp };