import { EditorAPI, Id } from '../types/CommonTypes'; import { TextType } from '../types/TextTypes'; /** * The ExperimentController contains all SDK functions that are considered for addition, * or functions we want to keep open for changing definitions. This is a sneak peak * into future versions of the SDK. Never build production code relying on functions in * this controller. */ export declare class ExperimentController { #private; /** * @ignore */ constructor(editorAPI: EditorAPI); /** * This method will assign an image from a variable to the correct ImageFrame * @param imageFrameId the id of the imageFrame where an image needs to be assigned to * @param variableId the id of the variable which contains the image * @returns */ insertImageVariableToFrame: (imageFrameId: Id, variableId: Id) => Promise>; /** * This method will insert a text variable in the selected frame. Calling this method * requires that the selected frame is in text editing mode. * @param id the id of the variable to be inserted. * @returns */ insertTextVariable: (id: Id) => Promise>; /** * This method will enter text editing mode on the provided frame. * @param id the id frame to enter text edit mode on. * @returns */ enterTextEditMode: (id: Id) => Promise>; /** * This method will exit text editing mode. * @returns */ exitTextEditMode: () => Promise>; /** * This method gets the text content of a text frame. * The variables contained in the text will return their values only if you * are in text editing mode. * @param frameId The ID of a text frame * @param textType The type of the text * @returns the text content */ getText: (frameId: string, textType: TextType) => Promise>; /** * This method sets the text content of a text frame * @param frameId The ID of a text frame * @param text The new text content * @returns */ setText: (frameId: string, text: string) => Promise>; /** * This method selects the text content of a text frame * @param frameId The ID of a text frame * @param startIndex The index where the selection starts * @param length The length of selection from startIndex * @returns */ selectText: (frameId: string, startIndex: number, length: number) => Promise>; /** * This method adds custom data that will be saved and restored when undoing and redoing. * Duplicate values are overwritten. The data is exposed via the onCustomUndoDataChanged event. * * @param key The key of the custom data * @param value The value of the custom data * @param skipEvent Whether to skip the event that is triggered when the custom data is changed, defaults to false * @returns */ addCustomUndoData: (key: string, value: string, skipEvent?: boolean) => Promise>; }