Skip to content

Configuration

The CreativeEditor SDK (CE.SDK) works out of the box with almost zero configuration effort. However, almost every part of CE.SDK can be adapted and its behaviour and look & feel changed.

Here is a list of all available configuration options:

KeyTypeDescription
baseURLstringDefinition of the the base URL of all assets required by the SDK.
callbacksobjectDefinition of callbacks the SDK triggers.
i18nobjectOptions to add custom translations to the SDK.
licensestringA license key that is unique to your product.
userIDstringAn unique ID tied to your application’s user. This helps us accurately calculate monthly active users (MAU). Especially useful when one person uses the app on multiple devices with a sign-in feature, ensuring they’re counted once. Providing this aids in better data accuracy.
localestringChosen language the editor is . Possible values are ‘en’, ‘de’, …
rolestringChosen role. Possible values are ‘Creator’ or ‘Adopter’.
themestringThe theme the SDK is launched in. Possible values are ‘dark’, ‘light’
uiobjectOptions to adapt the user interface elements.
defaultFontstringAn ID of the font asset source to be set as a default font. Set to ‘//ly.img.cesdk.fonts/roboto_regular’ by default.
import CreativeEditorSDK from 'https://cdn.img.ly/packages/imgly/cesdk-js/1.51.0/index.js';
const config = {
license: 'YOUR_API_KEY',
userId: 'USER_ID',
baseURL: 'https://cdn.img.ly/packages/imgly/cesdk-js/1.51.0/assets',
locale: 'en', // 'de'
theme: 'light', // 'dark'
role: 'Creator', // 'Adopter' 'Viewer'
callbacks: { onUpload: 'local' }, // Enable local uploads in Asset Library.
logger: (message, logLevel) => {
console.log(`${logLevel}: ${message}}`);
},
};
CreativeEditorSDK.create('#cesdk_container', config).then(async instance => {
// Populate the asset library with default / demo asset sources.
instance.addDefaultAssetSources();
instance.addDemoAssetSources({ sceneMode: 'Design' });
await instance.createDesignScene();
});