Every iPrintessApi method or property in printess-editor.d.ts that has no #ai-api:<category> JSDoc tag - grouped here so the reference stays complete rather than silently omitting them. Custom types referenced below (parameter and return shapes) are documented on the Types reference.
acceptDefaultTextIfMandatory(): boolean
Returns all default english translations or if language property is set / browser language is detected (if set to auto) the respective translation if available
Returns: boolean
addTableRow(fieldNameOrId: string, type: string): number | null
Adds a new row to a table form field. Returns row-index of added row.
| Parameter | Type | Description |
|---|---|---|
fieldNameOrId |
string |
The property-id or a form-field-name or form-field-id |
type |
string |
each form field table should have a type column which can be set on insert. |
Returns: number | null
addTableRowExt(fieldNameOrId: string, type: string, insertPosition?: number): { index: number | null; row: Record<string, any> | null }
Adds a new row to a table form field. Returns row-index of added row and the added row itself.
| Parameter | Type | Description |
|---|---|---|
fieldNameOrId |
string |
The property-id or a form-field-name or form-field-id |
type |
string |
each form field table should have a type column which can be set on insert. |
insertPosition? |
number |
Returns: { index: number | null; row: Record<string, any> | null }
addTableRows(fieldNameOrId: string, type: string, ffLibName: string, libIndizies: Array<number>): number | null
Adds multiple table rows at once from another table from field
| Parameter | Type | Description |
|---|---|---|
fieldNameOrId |
string |
The property-id or a form-field-name or form-field-id |
type |
string |
each form field table should have a type column which can be set on insert. |
ffLibName |
string |
Name of form-field which contains row-library |
libIndizies |
Array<number> |
list if row-indizies of row-library |
Returns: number | null
addTableRowsExt(fieldNameOrId: string, type: string, ffLibName: string, libIndizies: Array<number>, insertPosition?: number): { index: number | null, table: Array<Record<string, any>> | null }
Adds multiple table rows at once from another table from field
| Parameter | Type | Description |
|---|---|---|
fieldNameOrId |
string |
The property-id or a form-field-name or form-field-id |
type |
string |
each form field table should have a type column which can be set on insert. |
ffLibName |
string |
Name of form-field which contains row-library |
libIndizies |
Array<number> |
list if row-indizies of row-library |
insertPosition? |
number |
Returns: { index: number | null, table: Array<Record<string, any>> | null }
aiDesignKeywords(): Array<string>
Returns: Array<string>
aiDesignMode(): "none" | "printess-make" | "claude-design"
Returns: “none” | “printess-make” | “claude-design”
aiTextEditOptionAllows(): Array<AiTextEditOptionAllow>
returns an array of AI Text Edit Options the customer can choose from (in a dropdown) when enabling the showAiTextEditOptions.
Returns: Array<AiTextEditOptionAllow>
allowImageBackgroundRemove(propertyId: string): boolean
Tells UI to always show image background remove button.
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
The selected property-id |
Returns: boolean
allowImageUpscale(propertyId: string): boolean
Tells UI to always show image background remove button.
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
The selected property-id |
Returns: boolean
applyImageFilterSnippet(filterSnippetUrl: string): Promise<void>
Applies image-filter-snippet to selected image
| Parameter | Type | Description |
|---|---|---|
filterSnippetUrl |
string |
Returns: Promise<void>
applyNumOfColsToLayoutsDialogMobile(): boolean
Apply number of columns for layouts also to mobile Layout Selection Overlay
Returns: boolean
bcuiLoaded(): Promise<void>
Called by BCUI when fully loaded and executes center spread in view first center
Returns: Promise<void>
bringErrorIntoView(err: iExternalError): Promise<void>
Select and zoom to the frame(s) mentioned in the error object.
| Parameter | Type | Description |
|---|---|---|
err |
iExternalError |
Returns: Promise<void>
bringErrorIntoViewV2(err: iErrorType): Promise<void>
| Parameter | Type | Description |
|---|---|---|
err |
iErrorType |
Returns: Promise<void>
canChangeTableRowIndex(propertyId: string): boolean
Tells if a change position input should be displayed for the table row that is being edited changing the position (index) value in the table edit row moves the row accordingly to the new position
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
Returns: boolean
canHaveDesktopFramePropertiesBar(): boolean
Returns if desktop ui should display a frame properties bar
Returns: boolean
canIgnoreLowImageResolution(): boolean
Tells if user is allowed to ignore low image resoution warnings
Returns: boolean
canPasteTableRowsJSON(propertyId: string): boolean
Tells if user is allowed to paste JSON data to a table form field.
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
Returns: boolean
canUseClaudeDesign(): boolean
If claude design is available
Returns: boolean
canUseClaudeDevStuff(): boolean
If claude design internal testing stuff is available
Returns: boolean
closePropertiesOverlay(): Promise<void>
for example: in bcui you can close the the overlay if a form field changes
Returns: Promise<void>
colorIntensity(color: string): "super-light" | "super-dark" | "light" | "dark" | "normal" | "no-color"
Calculates the brightness of a color, return no-color if color can’t be parsed
| Parameter | Type | Description |
|---|---|---|
color |
string |
hex or rgb() color |
Returns: “super-light” | “super-dark” | “light” | “dark” | “normal” | “no-color”
createCropUi(propertyId: string, forDesktopDialog: boolean): null | { container: HTMLDivElement, setScale: (s: number) => void, getCropBox(): { top: number, left: number, width: number, height: number } }
Returns a simple ui to change the postion of an image
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
|
forDesktopDialog |
boolean |
give more space if for desktop dialog |
Returns: null | { container: HTMLDivElement, setScale: (s: number) => void, getCropBox(): { top: number, left: number, width: number, height: number } }
createCutContour(propertyId: string, outline?: number): Promise<boolean>
Creates a cut contour around the image
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
The selected property-id |
outline? |
number |
Returns: Promise<boolean>
createImageEdit(propertyId: string, prompt: string, quality?: "low" | "medium" | "high", images?: string[], imageInfo?: { boxId: string | undefined, aspect: number, parentBoxId?: string }, model?: string,): Promise<boolean>
Modifies an existing image based on a prompt and uploads & assigns it to current frame.
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
|
prompt |
string |
|
quality? |
“low” | “medium” | “high” |
|
images? |
string[] |
|
imageInfo? |
{ boxId: string | undefined, aspect: number, parentBoxId?: string } |
|
model? |
string |
Returns: Promise<boolean>
createText2Image(prompt: string, style: SdxlStyle, negativePrompt?: string, model?: string, imageInfo?: { boxId: string | undefined, aspect: number, parentBoxId?: string }): Promise<void>
Creates an image based on a prompt and style and uploads & assigns it to current frame.
| Parameter | Type | Description |
|---|---|---|
prompt |
string |
|
style |
SdxlStyle |
|
negativePrompt? |
string |
|
model? |
string |
|
imageInfo? |
{ boxId: string | undefined, aspect: number, parentBoxId?: string } |
Returns: Promise<void>
debug(): boolean
Returns global debug flag
Returns: boolean
editTableFullscreen(): boolean
Indicates if a table can be edited in fullscreen mode
Returns: boolean
enableA11yForTableControl(): boolean
Returns wether UI should show up/down buttons in table-control
Returns: boolean
enableCustomColors(): boolean
Returns if buyer ui should display option for custom colors in color dropdown
Returns: boolean
executeFormFieldScript(propertyId: string): Promise<string>
Runs a form field script, property-id must point to form field.
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
Returns: Promise<string>
executeScript(scriptName: string, args: string[]): string | Promise<string>
| Parameter | Type | Description |
|---|---|---|
scriptName |
string |
name of script in current template |
args |
string[] |
all arguments as an array of string |
Returns: string | Promise<string>
focusActiveTextEditor(): boolean
Focus single or multi line editor when active
Returns: boolean
generateLiveTextFromAI(pid: string, promptForAI: string, usePreviousText: boolean): Promise<void>
Streams AI-generated text based on the given prompt and current editor content. Updates the editor live as the response is received in chunks.
| Parameter | Type | Description |
|---|---|---|
pid |
string |
|
promptForAI |
string |
- Instructional prompt to guide the AI generation. |
usePreviousText |
boolean |
Returns: Promise<void>
getAddToBasketCallback(): null | ((saveToken: string, url: string) => void)
Returns the add to basket callback you have set in attachPrintess()
Returns: null | ((saveToken: string, url: string) => void)
getAiDesignMakeData(): iMakeData | null
returns make-data received on attach printess
Returns: iMakeData | null
getAiDesignProperties(): { name: string, p: iExternalProperty }[]
Returns: { name: string, p: iExternalProperty }[]
getAiImageEffects(): Promise<ImageAIFilterCategory[]>
loads all available Image AI Filters
Returns: Promise<ImageAIFilterCategory[]>
getAllRequiredPropertiesBySpreadIdSync(spreadId: string): Array<Array<iExternalProperty>>
Returns a list of all required properties on a specific spread (sync)
| Parameter | Type | Description |
|---|---|---|
spreadId |
string |
Returns: Array<Array<iExternalProperty>>
getAllRequiredPropertiesSync(): Array<Array<iExternalProperty>>
Returns a list of all required properties (sync)
Returns: Array<Array<iExternalProperty>>
getAspectControl(): HTMLElement | ""
Returns the Designer Side Aspect Control
Returns: HTMLElement | “”
getAvailableFontSizes(size: string): { sizes: Array<number>, unit: string }
Returns list of available Font Sizes based on “size” unit.
| Parameter | Type | Description |
|---|---|---|
size |
string |
Returns: { sizes: Array<number>, unit: string }
getBackButtonCallback(): null | ((saveToken: string, thumbnailUrl: string) => void)
Returns the back button callback you have set in attachPrintess()
Returns: null | ((saveToken: string, thumbnailUrl: string) => void)
getButtonCircleModel(m: iMobileUIButton, isSelected: boolean, customHandwriting?: boolean, customSplitterButton?: boolean, customTableRecordButton?: boolean): iButtonCircle
Mobile UI helper method to get model to draw a circle button including icons, gauge, etc. uiHelper contains a method to create an SVG from this circle model
| Parameter | Type | Description |
|---|---|---|
m |
iMobileUIButton |
The mobile button to create a circle for |
isSelected |
boolean |
If the button is selected |
customHandwriting? |
boolean |
|
customSplitterButton? |
boolean |
|
customTableRecordButton? |
boolean |
Returns: iButtonCircle
getClaudeDesignSettings(): iClaudeDesignSettings | undefined
Returns last persisted Claude design dialog inputs from template properties.
Returns: iClaudeDesignSettings | undefined
getColorInfo(p: iExternalProperty): iExternalColor | null
| Parameter | Type | Description |
|---|---|---|
p |
iExternalProperty |
Returns: iExternalColor | null
This method is deprecated.
getContentEditables(): TemplateEditables
Returns: TemplateEditables
getErrorCallback(): null | ((errorName: ErrorName, data?: Record<string, string>) => void)
Returns the error callback you have set in attachPrintess()
Returns: null | ((errorName: ErrorName, data?: Record<string, string>) => void)
getFirstLevelImageButtons(p: iExternalProperty, addImageTools: boolean): Array<iMobileUIButton>
Used in BCUI, gets new basic image categorie buttons
| Parameter | Type | Description |
|---|---|---|
p |
iExternalProperty |
|
addImageTools |
boolean |
Returns: Array<iMobileUIButton>
getFrameUiHintPosition(): Promise<iExternalFrame>
Get frames available on spread. Return first editable frame.
Returns: Promise<iExternalFrame>
getFreestylePhotobookWizardHeadline(): string
Returns headline to display in wizard for freestyle photobooks.
Returns: string
getImageBoxesForColorPalette(): string[]
Returns maximum two image IDs with biggest boxes on a spread (to define colors from it)
Returns: string[]
getImageFilterSnippets(tags: Array<string> | ReadonlyArray<string>): Promise<Array<iExternalSnippet>>
Get a list of all image-filter-snippets having any of the provided tags
| Parameter | Type | Description |
|---|---|---|
tags |
Array<string> | ReadonlyArray<string> |
Returns: Promise<Array<iExternalSnippet>>
getInitialTabId(): string
Get the id if the tab to display on start-up
default is #PHOTOS
Returns: string
getLetterGeneratorJson(): Promise<string | undefined>
Returns the JSON required to generate an AI Letter
Returns: Promise<string | undefined>
getLetterGeneratorMenuTitle(): string
Get the menu title displayed when opening the AI Text Generator dropdown in the Buyer Side
Returns: string
getLoadTemplateButtonCallback(): null | (() => void)
Returns the loadTemplateButtonCallback you have set in attachPrintess()
Returns: null | (() => void)
getMagicPhotobookSettingsTab(): "NONE" | "#FORMFIELDS" | "#FORMFIELDS1" | "#FORMFIELDS2"
Returns tab displayed in magic photobook settings
Returns: “NONE” | “#FORMFIELDS” | “#FORMFIELDS1” | “#FORMFIELDS2”
getMagicPhotobookWizardHeadline(): string
Returns headline to display in wizard for magic photobooks.
Returns: string
getMobileImageCropModeEnabled(): boolean
get if mobile image crop mode is enabled and should show the circular image pan-icon
Returns: boolean
getMobileUiBackgroundButton(): Array<iMobileUIButton>
Returns change background button if available
Returns: Array<iMobileUIButton>
getMobileUiButtons(properties: Array<iExternalProperty>, propertyIdFilter: "all" | "root" | string, customHandwriting?: boolean): Array<iMobileUIButton>
Mobile UI helper method to convert a list of properties to a list of mobile buttons to show to the buyer
| Parameter | Type | Description |
|---|---|---|
properties |
Array<iExternalProperty> |
list of properties to get buttons from |
propertyIdFilter |
“all” | “root” | string |
can be the id of a specific property to get only property related buttons (for images and multi-line text) |
customHandwriting? |
boolean |
Returns: Array<iMobileUIButton>
getMobileUiRecordNavigationArrows(): Array<iMobileUIButton>
Mobile UI helper method to go through a table form-field which is set as data-source in the template
Returns: Array<iMobileUIButton>
getMobileUiScissorsButtons(): Array<iMobileUIButton>
Returns horizontal and vertical scissor buttons if available
Returns: Array<iMobileUIButton>
getMobileUiSplitterGapButton(): Array<iMobileUIButton>
Returns grid gap button for splitter frames
Returns: Array<iMobileUIButton>
getMobileUiSplitterLayoutsButton(): Array<iMobileUIButton>
Returns change layouts button for splitter text frames
Returns: Array<iMobileUIButton>
getMobileUiSplitterToImageButton(): Array<iMobileUIButton>
Returns text to image convert button if available
Returns: Array<iMobileUIButton>
getMobileUiSplitterToTextButton(): Array<iMobileUIButton>
Returns image to text convert button if available
Returns: Array<iMobileUIButton>
getPanelUiHintVisibility(pos: PanelUiHintPos, view: "mobile" | "desktop"): boolean
Returns view dependend visibility of a certain panel-ui-hint
| Parameter | Type | Description |
|---|---|---|
pos |
PanelUiHintPos |
|
view |
“mobile” | “desktop” |
Returns: boolean
getPasteboardColor(): string
Returns current pasteboard color
Returns: string
getRegExp(key: string | "europe-letters"): string | null
| Parameter | Type | Description |
|---|---|---|
key |
string | “europe-letters” |
retrieves a regexp expression from dictonary |
Returns: string | null
getSaveTemplateCallback(): null | ((saveToken: string, type: "save" | "close", thumbnailUrl: string) => void)
Returns the save button callback you have set in attachPrintess()
Returns: null | ((saveToken: string, type: “save” | “close”, thumbnailUrl: string) => void)
getScaledFontSize(direction: "up" | "down", propertyId: string | "ED_selection", overrideSize?: string): string | null
Gets the current font-size either in text-editor or form mode as Length (string like 12% or 14pt)
| Parameter | Type | Description |
|---|---|---|
direction |
“up” | “down” |
|
propertyId |
string | “ED_selection” |
|
overrideSize? |
string |
Returns: string | null
getScriptButtons(): Array<iExternalButton>
Returns all PanelUi button objects defined in global scripts
Returns: Array<iExternalButton>
getShopDataCallback(): null | (() => Promise<IShopData>)
Returns the shop data callback you have set in attachPrintess()
Returns: null | (() => Promise<IShopData>)
getShopDataLoadedCallback(): null | ((data: ISavedShopData) => void),
Returns the shop callback that needs to be called if the user clicks on load and selects a saved design
Returns: null | ((data: ISavedShopData) => void)
getShopLoginCallback(): null | ((type: "register" | "login", saveToken: string, thumbnailUrl: string, displayName: string) => void)
Returns the shop login callback you have set in attachPrintess()
Returns: null | ((type: “register” | “login”, saveToken: string, thumbnailUrl: string, displayName: string) => void)
getShopProjectDisplayNameCallback(): null | (() => Promise<string>)
Returns the display name callback you have set in attachPrintess()
Returns: null | (() => Promise<string>)
getShopSavedDataCallback(): null | ((shopData: IShopDataProjectName) => void)
Returns the shop saved data callback you have set in attachPrintess()
Returns: null | ((shopData: IShopDataProjectName) => void)
getStyleValue(className: string, propertyName: string): string
Retrieves a style value from a particular class
| Parameter | Type | Description |
|---|---|---|
className |
string |
|
propertyName |
string |
Returns: string
getTableGroupType(): string
Returns group type as string for table form fields
Returns: string
getTableRowIndex(propertyId: string): number
Retrieves the current row index for a table-property if table is set to be data-source of template the call returns current data-index
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
id of a table property |
Returns: number
getTableRowsToAdd(ffName: string): Array<{ index: number, label: string }>
Returns the row-indizies of a table form field to add to another table form field. An array of those indizies can be passed to ‘addTableRows()’
| Parameter | Type | Description |
|---|---|---|
ffName |
string |
Form Field Name |
Returns: Array<{ index: number, label: string }>
getTableSelectListByFormFieldName(ffName: string): Array<{ value: string, label: string }> | null
Returns name/value-list only from table form field
| Parameter | Type | Description |
|---|---|---|
ffName |
string |
Name of FormField |
Returns: Array<{ value: string, label: string }> | null
getText2ImageStyles(): Array<string>
Returns list of available SDXL Styles
Returns: Array<string>
getThemeDocId(): string
Retrieve doc-id of current theme
Returns: string
getThemeName(): string
Retrieve panel-theme of current document
Returns: string
hasImageLayoutSelection(): boolean
Returns if auto image layout selection is enabled
Returns: boolean
hasImageSwap(): boolean
Indicates if curent selected image can swap
Returns: boolean
hasMetaProperties(p: iExternalProperty): boolean
Returns if an externalProperty resolves to multiple mobile-ui-buttons
| Parameter | Type | Description |
|---|---|---|
p |
iExternalProperty |
Returns: boolean
hasOverlayTextEditing(): boolean
Returns if text-editing should be displayed as overlay on desktop
Returns: boolean
hasTextOverflow(propertyId: string): boolean
Returns true if the associated mutli-line text-frame has text which does not fit into the frame
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
Returns: boolean
This method is deprecated.
hideDoneButtonInUiHelper(): boolean
Hides Done Button in UI-Helper
Returns: boolean
hideOverlay(): void
Hides printess editor overlay (see showOverlay())
Returns: void
imageSwapActive(): boolean
Indicates if editor is in image swap mode
Returns: boolean
isDataSource(propertyId: string): boolean
tells if the propertyId refers to a table form-field which is set as data-source in the template
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
Returns: boolean
isOffCanvasProperty(p: iExternalProperty): boolean
For off-canvas displays of to many frame properties. Determines if the property is suitable to be displayed off canvas.
| Parameter | Type | Description |
|---|---|---|
p |
iExternalProperty |
the property to look for |
Returns: boolean
isPrintessSystem(): boolean
Returns true if the system is the Printess SaaS system.
Returns: boolean
isScrolledToBottom(): boolean
indicates if printess view scrolling has reached the bottom
Returns: boolean
isScrolledToTop(): boolean
indicates if printess view scrolling has reached the top
Returns: boolean
isShopUserLoggedInCallback(): null | (() => Promise<boolean>)
Returns the login state callback you have set in attachPrintess()
Returns: null | (() => Promise<boolean>)
isTextButton(m: iMobileUIButton): boolean
Returns if a iMobileUIButton should display text instead of an icon
| Parameter | Type | Description |
|---|---|---|
m |
iMobileUIButton |
Returns: boolean
isTextEditorOpen(): boolean
Returns true if either rich- or simple-text-editor is currently active
Returns: boolean
jumpToFormFieldsAfterLayoutApply(): boolean
Wether UI should jump to FormFields Tab after Layout Selection
Returns: boolean
languageLong(): string
Returns long language code if available. Otherwise returns short code like languageShort().
Format: lower case main language + sub language in upper case, like “en-GB” or “de-DE”
Returns: string
languageShort(): string
Returns short language code in lower case, like “en” or “de”
Returns: string
logout(): void
Logs the current printess user out Not available for buyer-side users! Only if userInBuyerSide() === true
Returns: void
neverHideMobileToolbar(): boolean
Returns status of config-flag neverHideMobileToolbar, default is false.
Returns: boolean
numberOfColumns(): number
Returns how many columns a Change Layout overview should have to display layout snippets more properly
Returns: number
populateDesign(autoSelectLayout: boolean, callback: (percent: number, textPreview: string) => void, errorCallback: (error: any) => void): Promise<void>
| Parameter | Type | Description |
|---|---|---|
autoSelectLayout |
boolean |
|
callback |
(percent: number, textPreview: string) => void |
|
errorCallback |
(error: any) => void |
Returns: Promise<void>
raiseTabChangeEvent(tabId: string): void
Used by panel-ui to call an existing onTabChanged script (event)
| Parameter | Type | Description |
|---|---|---|
tabId |
string |
Returns: void
removeAiImageFramesFromPrimaryDocument(): Promise<void>
Returns: Promise<void>
removeBackgroundFace(propertyId: string): Promise<boolean>
Cut out face of currently selected images
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
The selected property-id |
Returns: Promise<boolean>
removeHandwritingImage(): Promise<boolean>
removes image for rich-text-frames which have a handwriting image set Sets back to text
Returns: Promise<boolean>
removeImageBackground(propertyId: string): Promise<boolean>
Removes Background of currently selected images
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
The selected property-id |
Returns: Promise<boolean>
resetUndoBufferAfterInitialLayoutSelection(spreadId: string): void
Lets printess know that the layout has been applied
| Parameter | Type | Description |
|---|---|---|
spreadId |
string |
Returns: void
runClaudeDesign(prompt: string, skill?: "printess-layout-skill", settings?: iClaudeDesignSettings): Promise<ConversionTask>
Render Design via Claude. Persists settings to template properties when provided.
| Parameter | Type | Description |
|---|---|---|
prompt |
string |
|
skill? |
“printess-layout-skill” |
|
settings? |
iClaudeDesignSettings |
Returns: Promise<ConversionTask>
selectedFrameBarFeature(): { images: number, texts: number, shapes: number, storys: number, total: number }
Tells the ui if it can rely that only one of the returned frame-types is selected
Returns: { images: number, texts: number, shapes: number, storys: number, total: number }
selectLayoutDialogHasBeenShownForCurrentSpread(spreadId: string): void
Register Select Layout Dialog shown for specific Spread
| Parameter | Type | Description |
|---|---|---|
spreadId |
string |
Returns: void
selectLayoutsTabOneTime(): boolean
Indicates if a Layouts Tab should be auto selected;
Returns: boolean
selectTab(tab: "#NONE" | "#LAYOUTS" | "#PHOTOS" | "#THEME" | "#PAGES" | "#ADD-TEXT" | "#ADD-IMAGE" |
"#FORMFIELDS" | "#FORMFIELDS1" | "#FORMFIELDS2" | string): Promise<void>
Selects Tab in Panel-Ui
| Parameter | Type | Description |
|---|---|---|
tab |
“#NONE” | “#LAYOUTS” | “#PHOTOS” | “#THEME” | “#PAGES” | “#ADD-TEXT” | “#ADD-IMAGE” | “#FORMFIELDS” | “#FORMFIELDS1” | “#FORMFIELDS2” | string |
Returns: Promise<void>
setBcuiMobile(v: boolean): void
| Parameter | Type | Description |
|---|---|---|
v |
boolean |
Returns: void
setCustomIcons(icons: Partial<Record<iconName, string>>, addToExisting: boolean): void
Sets attach-parameter icons later in the game
| Parameter | Type | Description |
|---|---|---|
icons |
Partial<Record<iconName, string>> |
|
addToExisting |
boolean |
Returns: void
setCustomScripts(scripts: Partial<Record<string, string>>, addToExisting: boolean): void
Sets attach-parameter scripts later in the game
| Parameter | Type | Description |
|---|---|---|
scripts |
Partial<Record<string, string>> |
|
addToExisting |
boolean |
Returns: void
setDefaultHyphenationLanguage(lang: iExternalHyphenationLanguage): Promise<boolean>
Sets global hyphenation language which overrides local language set on story/text-frame level.
| Parameter | Type | Description |
|---|---|---|
lang |
iExternalHyphenationLanguage |
language |
Returns: Promise<boolean>
setEditorText(text: string): boolean
Replaces multi-line text only works with a current active multi-line-text-editor
| Parameter | Type | Description |
|---|---|---|
text |
string |
The text to insert into the active multi-line editor |
Returns: boolean
setIFrameViewPort(v: { offsetTop: number, height: number }): void
only for internal use, to transfer visual-viewport to iOs in iframe-mode
| Parameter | Type | Description |
|---|---|---|
v |
{ offsetTop: number, height: number } |
Returns: void
setTableCell(fieldNameOrId: string, rowIndex: number, col: iExternalTableColumn, value: string | number | boolean): Promise<iExternalError | null>
updates a specific cell of a form field of type “table” Any then all other updates, this will NOT trigger a selection change event on buyer side
| Parameter | Type | Description |
|---|---|---|
fieldNameOrId |
string |
|
rowIndex |
number |
|
col |
iExternalTableColumn |
|
value |
string | number | boolean |
Returns: Promise<iExternalError | null>
setTableCellV2(fieldNameOrId: string, rowIndex: number, col: iExternalTableColumn, value: string | number | boolean): Promise<iErrorType | null>
| Parameter | Type | Description |
|---|---|---|
fieldNameOrId |
string |
|
rowIndex |
number |
|
col |
iExternalTableColumn |
|
value |
string | number | boolean |
Returns: Promise<iErrorType | null>
setTableRowIndex(propertyId: string, index: number): void
Sets the selected index of the primary data-source if the propertyId refers to a table form-field which is set as data-source in the template
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
id of a table property |
index |
number |
current row-index to select |
Returns: void
setTextStyleProperty(propertyId: string, name: "font" | "lineHeight" | "color" | "size" | "tracking" | "hAlign" | "vAlign" | "pStyle" | "baselineScript", value: string, textStyleMode?: textStyleModeEnum): Promise<string>
Method to set a text style meta-property
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
|
name |
“font” | “lineHeight” | “color” | “size” | “tracking” | “hAlign” | “vAlign” | “pStyle” | “baselineScript” |
|
value |
string |
|
textStyleMode? |
textStyleModeEnum |
Returns: Promise<string>
setUserHasZoomedFlag(newValue: boolean): void
Tells printess that a user interaction has changed the zoom, no automatic spread zoom will be executed after this
| Parameter | Type | Description |
|---|---|---|
newValue |
boolean |
Returns: void
showAiImageEffects(): boolean
Returns if buyer should be able to use advanced ai image effects
Returns: boolean
showAiTextEditOptions(): boolean
Allow AI Text editing like spell checking, changing writing-style, etc.
Returns: boolean
showColorDialog(p: iExternalProperty, bcuiCssVariables?: any): Promise<iExternalColor | null>
Shows internal color dialog to select cmyk color
| Parameter | Type | Description |
|---|---|---|
p |
iExternalProperty |
|
bcuiCssVariables? |
any |
Returns: Promise<iExternalColor | null>
showContextMenu(e: MouseEvent, items: Array<iExternalContextMenuItem>): void
Displays a dropdown Menu at the target position with the set menu items
| Parameter | Type | Description |
|---|---|---|
e |
MouseEvent |
MouseEvent to get the target and mouse position |
items |
Array<iExternalContextMenuItem> |
Menu items that should be displayed |
Returns: void
showDocumentBackButton(): boolean
Returns: boolean
showEnterTextEditorButton(): boolean
Returns true if either rich- or simple-text-editing is allowed (text-content is turned on)
Returns: boolean
showFormFieldTabsAsSteps(): boolean
Returns true if a previous step is availabel
Returns: boolean
showLayoutsDialog(): boolean
Indicates if a Layouts Dialog should be displayed when initially opening the Buyer Side to choose a Layout Snippet
Returns: boolean
showLoadButton(): boolean
Returns true if the ui should show a “load” button.
Returns: boolean
showMobileTabNavigation(): boolean
Returns Buyer-Side Flag if ui should show bottom tab bar on mobile
Returns: boolean
showOverlay(message: string): void
Displays a grey overlay on printess editor
| Parameter | Type | Description |
|---|---|---|
message |
string |
Message to show on overlay |
Returns: void
showPagesOnLoad(): iShowPagesPreviewMode
Tells UI to show pages-overview after magic-photobook-wizzard has been completeted
Returns: iShowPagesPreviewMode
showPhotoTab(): boolean
If Tab-Navigation is enabled, this method tells if a “PHOTO” tab makes sense.
Returns: boolean
showSimplifiedPagesView(): iShowPagesPreviewMode
Tells UI to show simplified pages view as last step of the magic-photobook-wizzard
Returns: iShowPagesPreviewMode
showSnippetPreviewOverlay(): boolean
Enables snippet preview overlay on snippet thumbnail hover
Returns: boolean
showTabNavigation(): boolean
Returns Buyer-Side Flag if ui should show left tab bar
Returns: boolean
showTabNavigationSetting(): boolean
Returns the pure setting from buyer-side dialog
Returns: boolean
showText2Image(): null | { selectStyle: boolean, prompt: string, prefix: string, postfix: string, defaultPrompt: string, style: SdxlStyle | null, negativePrompt: string, model: string, transparency: string, allowUpload: boolean }
Returns not null if buyer should be able to use generative ai image creation
Returns: null | { selectStyle: boolean, prompt: string, prefix: string, postfix: string, defaultPrompt: string, style: SdxlStyle | null, negativePrompt: string, model: string, transparency: string, allowUpload: boolean }
showTextEditor(): void
Open rich- or simple-text-editor
Returns: void
showTextStyleCaptions(): boolean
Returns true if text styles should have a caption
Returns: boolean
startOrStopImageSwap(): void
Activates Image Swap Mode
Returns: void
streamAnthropicPrompt(
request: {
prompt: string,
model?: "fable-5.0" | "opus-5.0" | "opus-4.8" | "opus-4.7" | "sonnet-4.6" | "haiku-4.5",
skill?: string,
maxTokens?: number,
imageUrls?: string[],
sessionId?: string,
containerId?: string,
purpose?: "Claude Design" | "Script Creation"
},
onMessage: (message: string) => void,
onFinished: (skillResults?: Array<{ filename: string, mimeType: string, encoding: "utf8" | "base64", data: string }>) => void
): Promise<{ sessionId?: string, containerId?: string, aiCreditsUsed?: number }>
Stream a prompt to Anthropic (Claude). Forwards text deltas to onMessage as they arrive
and calls onFinished once the stream completes, passing any skill-generated files.
| Parameter | Type | Description |
|---|---|---|
request |
{ prompt: string, model?: “fable-5.0” | “opus-5.0” | “opus-4.8” | “opus-4.7” | “sonnet-4.6” | “haiku-4.5”, skill?: string, maxTokens?: number, imageUrls?: string[], sessionId?: string, containerId?: string, purpose?: “Claude Design” | “Script Creation” } |
|
onMessage |
(message: string) => void |
|
onFinished |
(skillResults?: Array<{ filename: string, mimeType: string, encoding: “utf8” | “base64”, data: string }>) => void |
Returns: Promise<{ sessionId?: string, containerId?: string, aiCreditsUsed?: number }>
streamPrompt(prompt: string, onMessage: (message: string) => void, onFinished: () => void): Promise<void>
| Parameter | Type | Description |
|---|---|---|
prompt |
string |
|
onMessage |
(message: string) => void |
|
onFinished |
() => void |
Returns: Promise<void>
toggleMobileImageCropModeEnabled(): boolean
toggle mobile image crop mode
Returns: boolean
uiHintsDisplay(): Array<"splitterGuide" | "layoutSnippets" | "groupSnippets" | "editableFrames" | "expertMode">
returns an array of uiHints to be displayed on buyer side.
Returns: Array<“splitterGuide” | “layoutSnippets” | “groupSnippets” | “editableFrames” | “expertMode”>
upscaleImage(propertyId: string): Promise<boolean>
Upscales Image of currently selected images
| Parameter | Type | Description |
|---|---|---|
propertyId |
string |
The selected property-id |
Returns: Promise<boolean>
userInBuyerSide(): boolean
Returns if a real user is logged in - in buyer side only mode with only print option
Returns: boolean
This method is deprecated.
validate(mode?: "all" | "until-current-step" | "selection"): Array<iExternalError>
| Parameter | Type | Description |
|---|---|---|
mode? |
“all” | “until-current-step” | “selection” |
Specifies when and up to which point the validation should be done. |
Returns: Array<iExternalError>
validateAsync(mode?: "all" | "until-current-step" | "selection"): Promise<Array<iExternalError>>
Closes open editors and returns an array of external property errors that can be used to display errors like missing text to the customer
| Parameter | Type | Description |
|---|---|---|
mode? |
“all” | “until-current-step” | “selection” |
Specifies when and up to which point the validation should be done. |
Returns: Promise<Array<iExternalError>>
validateAsyncV2(mode?: "all" | "until-current-step" | "selection"): Promise<Array<iErrorType>>
| Parameter | Type | Description |
|---|---|---|
mode? |
“all” | “until-current-step” | “selection” |
Returns: Promise<Array<iErrorType>>
validateCurrentTabId(curTabId: string): string
Returns passed tab-id or initial tab id if current is invalid
| Parameter | Type | Description |
|---|---|---|
curTabId |
string |
Returns: string
WcBc: {
masterStyles: () => string
getStrokeUi: () => HTMLElement // TemplateResult
}
Returns: { masterStyles: () => string getStrokeUi: () => HTMLElement // TemplateResult }