Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Configuration

Configuration options and asset definitions for image editing tasks.

Hierarchy

  • Configuration

Index

Properties

Optional [Tool.ADJUSTMENT]

[Tool.ADJUSTMENT]: AdjustmentConfiguration

Configuration options for Tool.ADUSTMENT.

Optional [Tool.BRUSH]

[Tool.BRUSH]: BrushConfiguration

Configuration options for Tool.BRUSH.

Optional [Tool.FILTER]

[Tool.FILTER]: FilterConfiguration

Configuration options for Tool.FILTER.

Optional [Tool.FOCUS]

[Tool.FOCUS]: FocusConfiguration

Configuration options for Tool.FOCUS.

Optional [Tool.FRAME]

[Tool.FRAME]: FrameConfiguration

Configuration options for Tool.FRAME.

Optional [Tool.LIBRARY]

[Tool.LIBRARY]: LibraryConfiguration

Configuration options for Tool.LIBRARY.

Optional [Tool.OVERLAY]

[Tool.OVERLAY]: OverlayConfiguration

Configuration options for Tool.OVERLAY.

Optional [Tool.STICKER]

[Tool.STICKER]: StickerConfiguration

Configuration options for Tool.STICKER.

Optional [Tool.TEXT]

[Tool.TEXT]: TextConfiguration

Configuration options for Tool.TEXT.

Optional [Tool.TEXT_DESIGN]

[Tool.TEXT_DESIGN]: TextDesignConfiguration

Configuration options for Tool.TEXT_DESIGN.

Optional [Tool.TRANSFORM]

[Tool.TRANSFORM]: TransformConfiguration

Configuration options for Tool.TRANSFORM.

Optional assetBaseUrl

assetBaseUrl: string = "assets/"

The base URL for all assets. Should be the absolute path to your assets directory

example

// Defaults to:

assets/

container

container: string | HTMLDivElement

element querySelector - the element querySelector where the editor should be rendered to DOMElement - The element the editor should be rendered to if HTMLDivElement, component will be rendered to that container This is a required field, no default value

Optional custom

Customization options.

Optional defaultTool

defaultTool: Tool = Tool.FILTER

Applicable only to Advanced UI decides which tool to keep open at the beginning

example

// Defaults to:

Tool.FILTER

Optional displayCanvasRendererWarning

displayCanvasRendererWarning: boolean = true

Should a message be displayed when when Photoeditor SDK is exited with close event

Optional displayCloseWarning

displayCloseWarning: boolean = true

Should a message be displayed when when Photoeditor SDK is exited with close event

Optional displayResizeWarning

displayResizeWarning: boolean = true

Should a message be displayed when the image has been scaled down for performance reasons

Optional displayToolControlBarTitle

displayToolControlBarTitle: boolean = true

Should the toolcontrolbartitle be displayed (advancedui only)

Optional enableZoom

enableZoom: boolean = true

Controls if the user can zoom the preview image.

example

// Defaults to:

true

Optional engine

engine: Omit<Omit<EngineConfiguration, "assetProvider">, "license">

AssetProvider is needed when standalone engine is being used, in case of UIs, Editor does the work of creating assetProvider

Optional export

Optional forceCrop

forceCrop: boolean = false

When set to true, the user is forced to crop the asset to one of the allowed crop ratios in transform.items before being able to use other features of the editor. The transform tool will only be presented if the image does not already fit one of the allowed aspect ratios. It will be presented automatically, if the user changes the orientation of the asset and the result does not match an allowed aspect ratio.

example

// Defaults to:

false

image

image: string | HTMLImageElement

The image that should be loaded and displayed initially accepts url or HTMLImageElement or imagePath relative to assets folder This is a required field, no default value

Optional language

language: ExistingLanguage | string = "en"

Defines the language that should be used to label the user interface.

example

// Defaults to:

'en'

Optional layout

layout: "advanced" | "basic"

The layout that should be loaded accepts url or 'advanced' | 'basic'

example

// Defaults to:

'advanced'

license

license: string

The PESDK license. If no license (or an invalid license) is provided, the engine will render a watermark over the preview and export output.

Optional mainCanvasActions

mainCanvasActions: Array<UNDO | REDO | CLOSE | EXPORT | undefined>

Defines all allowed actions for the main screen that are displayed in the given order as buttons on the canvasBar.

example

// Defaults to:

[CanvasAction.UNDO, CanvasAction.REDO, CanvasAction.CLOSE, CanvasAction.EXPORT]

Optional order

order: "default" | "reverse" = "default"

relevant only for AdvancedUI

Optional snapping

Global snapping options for all sprites, e.g., stickers, texts, and text designs.

Optional theme

theme: ExistingTheme | string = "dark"

Defines the theme that should be used to style the user interface.

example

// Defaults to:

'dark'

Optional tools

tools: Array<Tool | Tool[]>

The tools to display in the main menu.

example

// Defaults to:

[
 Tool.LIBRARY,
[ Tool.TRANSFORM, Tool.FILTER, Tool.ADJUSTMENT ],
[ Tool.FOCUS, Tool.FRAME, Tool.OVERLAY ],
[ Tool.TEXT, Tool.TEXT_DESIGN, Tool.STICKER, Tool.BRUSH ],
]