Skip to main content
CESDK/Web/Configuration
Language:

Basic Configuration Settings of CreativeEditor SDK

In this example, we will show you how to configure the CreativeEditor SDK.

Explore a full code sample of the integration on CodeSandbox or view the code on GitHub.

Basic Configuration#

The CE.SDK comes with a set of basic configuration parameters that let's you influence its look & feel.


  • baseURL: string defines the root for all assets that are used by the CE.SDK. It defaults to our CDN, but should be changed in production environments. See Serving Assets for an in-depth explanation of how to serve assets from your own servers.
  • locale: string defines the current language in the user interface. The CE.SDK is shipped with locales for English (en) and German (de), but any other language is possible. See Internationalization for an in-depth explaination of how to add new languages or modify the predefined translations.
  • theme: string sets the active theme. The CE.SDK includes predefined dark or light themes but is also highly customizable to match any style. See Theming for an in-depth explanation of how to create your own theme.
  • role: string sets the active role to either 'Creator', 'Adopter', 'Viewer', or 'Presenter'. See Understanding Roles for an in-depth introduction to the concept of roles in the editor and how to use them properly.
  • initialSceneString: string sets a scene description that will be loaded on startup. See Load A Scene for more details on scene loading.
  • initialSceneURL: string will load a scene file from the given URL. Takes precedence over initialSceneString, but initialSceneString will be used as fallback if fetching fails. See Load A Scene for more details on scene loading.
  • initialImageURL: string will instantiate the editor with a single page containing the image stored at the given URL. Takes precedence over any of the other initial options. Falls back to initialSceneURL if image is not avialable or not an image.
File:
import 'https://cdn.img.ly/packages/imgly/cesdk-js/1.7.0/cesdk.umd.js';
let config = {
baseURL: 'https://cdn.img.ly/packages/imgly/cesdk-js/1.7.0/assets',
locale: 'en', // 'de'
theme: 'light', // 'dark'
role: 'Creator', // 'Adopter' 'Viewer'
initialSceneString: 'UBQ1ewoiZm9ybW…', // A scene string
initialSceneURL: '/example.scene', // A URL pointing at a scene file
initialImageURL: undefined // A URL pointing to an image file
};
CreativeEditorSDK.init('#cesdk_container', config).then((instance) => {
/** do something with the instance of CreativeEditor SDK **/
});