TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

Initialization modes

api.js allows you to initialize the SDK in the following modes:

  • manager - displays a list of entities depending on the specified rootPath;
  • room-selector - opens the room selector;
  • file-selector - opens the file selector;
  • editor - allows you to open the SDK as a document editor for editing by specifying the id parameter for a file;
  • viewer - allows you to open the SDK as a document editor for viewing by specifying the id parameter for a file;
  • system - calls the system methods.

To simplify working with modes, the SDK has methods that do not require you to specify the appropriate mode:

DocSpace.SDK
Name Description
initManager Initializes the SDK frame in the "manager" mode.
initRoomSelector Initializes the SDK frame in the "room-selector" mode.
initFileSelector Initializes the SDK frame in the "file-selector" mode.
initEditor Initializes the SDK frame in the "editor" mode.
initViewer Initializes the SDK frame in the "viewer" mode.
initSystem Initializes the SDK frame in the "system" mode.