# OneEditor Integration Profile

UnifiedSlide is a single-file processing package and can be loaded by an
integrated Editor Host after the Host determines that the active file is a slide
file (`.usldx`, `.pptx`, `.pptm`).

```js
require(['UnifiedSlide/main'], function (UnifiedSlide) {
  const control = UnifiedSlide.createEditorControl({
    container: frame,
    mode: 'edit',
    hostProfile: 'oneEditor',
    OpenFile: hostOpenFile,
    SaveFile: hostSaveFile
  });

  const commands = control.getCommandRegistry();
  const menus = control.getMenuContributions({ surface: 'oneEditor', mode: 'edit' });
  const toolbars = control.getToolbarContributions({ surface: 'oneEditor', mode: 'edit' });
  const capabilities = control.getFileCapabilities();
});
```

`surface: 'oneEditor'` omits the package File menu by default because an
integrated multi-format Host may own the File menu UI.  The File commands still
exist and can be invoked by the Host.

Normal Workbench or standalone Host usage can use the package menu, toolbar and
File menu directly.


## UnifiedControl dependency

Host/Demo configures `UnifiedControl` as a RequireJS alias to the shared Control Framework package. UnifiedSlide does not copy UnifiedControl into this ZIP.

```js
require.config({
  paths: {
    UnifiedControl: 'https://cdn.skylarkjs.com/itoolkits/developments/UnifiedControl/scripts',
    UnifiedSlide: '<UnifiedSlidePackageRoot>/scripts'
  }
});
```
