# To v1.13

In version v1.13, the way the CreativeEngine and CreativeEditor SDK are configured has changed. Several configuration options that were previously passed to `CreativeEngine.init()` or `CreativeEditor SDK.init()` have been removed or replaced. This document will explain the changes and describe the steps you can take to adapt them to your setup.

#### CreativeEditorSDK initialization[#](#creativeeditorsdk-initialization)

We are also introducing a new way of instantiating the CreativeEditorSDK, that provides more precise control over the initialization. Using `CreativeEditorSDK.create()`, you have the chance to configure the SDK before loading or creating a scene. This was not possible before. When using `CreativeEditorSDK.init()`, the SDK would create the initial scene before giving you the option to perform additional configuration via the API.

The `create()` method will not create an initial scene for you. You need to do that yourself, using either the Scene API at `cesdk.editor.scene`, or one of the methods on the CreativeEditorSDK instance itself (`createDesignScene`, `createVideoScene`, `loadFromUrl`, `loadFromString`).

### Rationale[#](#rationale)

Over time the number options you could pass into the call to `CreativeEngine.init({...config})` has grown quite a bit. Initially this was the only place where you could configure the behavior and settings of the CreativeEngine, but over the past year we introduced several new APIs. One of those APIs is the EditorAPI, which lets you

[adjust](sveltekit/settings-970c98/) many [settings](sveltekit/settings-970c98/) at runtime, not just at the launch of the app.

To improve consistency of our APIs, we decided to scale back the options available in the configuration object in favor of changing settings via the EditorAPI. The only options that remain are those that are strictly necessary for the initialization of the CreativeEngine, such as the `baseUrl` and `license`.

These changes were performed with the Creative Engine in mind, but since the CreativeEditor SDK shares a lot of the same code, the changes described in this document also apply to the configuration for the CE.SDK.

### Changed configuration options[#](#changed-configuration-options)

The following is a list of all configuration options that have been changed or removed, along with instructions on how to migrate the use of these options in your codebase:

*   `scene` options (`dpi`, `pixelScaleFactor`) have been removed. `scene/dpi` and `scene/pixelScaleFactor` can now be found as [properties on the scene in the BlockAPI](sveltekit/concepts/blocks-90241e/) .
*   `page` options have been removed.
    *   `page.title.show` has been replaced with `cesdk.engine.editor.setSettingBool('page/title/show', enabled)`
    *   `page.title.fontFileUri` has been replaced with `cesdk.engine.editor.setSettingString('page/title/fontFileUri', uri)`
    *   `page.dimOutOfPageAreas` has been replaced with `cesdk.engine.editor.setSettingBool('page/dimOutOfPageAreas', dimEnabled)`
*   `assetSources` have been removed. To add asset sources, use the AssetAPI at `cesdk.engine.asset`.
*   `preset.colors` has been removed as it was never used, previously.
*   `presets.colorPalettes` has been removed from CreativeEngine as it was not used. It has been moved to `ui.colorPalette` in the CESDK.
*   `presets.images` has been removed. To add assets and asset sources, use the AssetAPI at `cesdk.engine.asset`.
*   `presets.pageFormats` has been removed from the CreativeEngine as it was not used. Is has been moved to `ui.pageFormats` in the CESDK. Previously it was possible to mark a page format as default by setting `meta: {default: true}` in it. In `ui.pageFormats`, this has been simplified, to just `default: true`.
*   `variables` has been removed. Use the [VariableAPI](sveltekit/create-templates/add-dynamic-content/text-variables-7ecb50/) instead.
*   `callbacks.log` has been moved to `logger`. Previously the logger callback would take a `Loglevel` enum as a second parameter. This enum has been removed. Instead you can define the loglevel with plain strings `'Warning' | 'Error' | 'Info'`

### Change initialization code[#](#change-initialization-code)

To ensure your users perceive a consistent UI experience, settings that have been moved to api calls should be made immediately after initializing the CreativeEngine. For the Creative Editor SDK, use the `create()` method, instead of `init()`

#### CreativeEngine[#](#creativeengine)

```
const engine = await CreativeEngine.init(config);// 1. Configure Engineengine.editor.setSettingEnum('doubleClickSelectionMode', 'Direct');// ... other settings
// 2. Create/load sceneconst sceneId = await engine.scene.create();
// 3. Append Engine canvas element to the DOMdocument.getElementById('my-engine-container').append(engine.element);
// ... your application code
```

#### CreativeEngine SDK[#](#creativeengine-sdk)

```
const cesdk = await CreativeEditorSDK.create('my-engine-container', config);// 1. Configure SDKcesdk.engine.asset.addSource(myAssetSource);// ... other settings
// 2. Create/load sceneconst sceneId = await cesdk.createDesignScene(myPageFormats[pageFormatId]);
// ... your application code
```

### Fallback and warnings[#](#fallback-and-warnings)

The CreativeEngine and CreativeEditor SDK still interpret the config object with its previous settings. If removed configuration options are detected during intialization, a warning is printed to the console, with individual instructions on how to migrate them. It is recommended to adjust your configuration as described above for the best compatibility with future developments and to get rid of these warnings.

The fallback mechanism is not enabled for the new `CreativeEditorSDK.create()` method! Passing removed configuration options to `create()` will cause that option to be ignored and an error will be printed to the console.

### CreativeEngine Typescript definitions[#](#creativeengine-typescript-definitions)

The more complex parts of our configuration (such as the page format definitions) were previously exporting type definitions under the `ConfigTypes` namespace in the CreativeEngine package. This namespace and all the types in it have been removed or moved elsewhere.

For now we still export `ConfigTypes`, but have marked it and its members as `@deprecated`. Most of them are not used at all anymore, the rest have been moved elsewhere:

*   `ConfigTypes.Color` can now be imported directly as `PaletteColor`
*   `ConfigTypes.TypefaceDefinition` can be imported directly, as `TypefaceDefinition`.
*   `ConfigTypes.PageFormatDefinition` can be imported directly as `PageFormatDefinition` (CE.SDK only).
*   `ConfigTypes.Logger` can be imported directly as `Logger`

The `LogLevel` enum that was previously used by `Logger` has been replaced with a string union (`'Warning' | 'Error' | 'Info'`).

### CreativeEditorSDK Typescript definitions[#](#creativeeditorsdk-typescript-definitions)

The CreativeEditor SDK package still _does_ export a `ConfigTypes` namespace.

For use with the new `CreativeEditorSDK.create()`, we are offering a new type `CreateConfiguration`, which is lacking all of the removed keys instead of marking them as deprecated.

### Demo asset sources[#](#demo-asset-sources)

When adding demo asset sources using `cesdk.addDemoAssetSources()`, or `engine.addDemoAssetSources()`, make sure to specify the correct scene mode. The installed demo asset sources vary between Design and Video modes.

If you don’t specify a scene mode, `addDemoAssetSources()` will try to add the correct sources based on the current scene, and default to `'Design'`. If you call `addDemoAssetSources()` _without_ a scene mode, and _before_ loading or creating a video scene, the audio and video asset sources will not be added.

---



[Source](https:/img.ly/docs/cesdk/sveltekit/to-v1-10-1ff469)