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

NameDescription
initManagerInitializes the SDK frame in the "manager" mode.
initRoomSelectorInitializes the SDK frame in the "room-selector" mode.
initFileSelectorInitializes the SDK frame in the "file-selector" mode.
initEditorInitializes the SDK frame in the "editor" mode.
initViewerInitializes the SDK frame in the "viewer" mode.
initSystemInitializes the SDK frame in the "system" mode.

Get Help

  • If you have any questions about ONLYOFFICE DocSpace, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).