Skip to main content

Config

The configuration parameters describe the behavior and display options of the DocSpace elements.

ParameterTypeExampleDescription
buttonColorstring"#5299E0"The selector button color.
checkCSPbooleantrueSpecifies whether to check for the presence of CSP headers before initialization.
destroyTextstring""The text inserted into the div tag when the destroyFrame method is called.
disableActionButtonbooleanfalseSpecifies whether to disable the Actions button in the manager interface.
downloadToEventbooleanfalseSpecifies whether to switch the SDK to the mode of working with download links through the onDownload event.
editorCustomizationobject{}The parameters to customize editors from this section.
editorGoBackbooleantrueSpecifies whether the File Location button is displayed in the editor.
editorTypestring"desktop"The editor mode display type ("embedded", "desktop").
eventsobjectconst events = { onSelectCallback: null, onCloseCallback: null, onAppReady: null, onAppError: null, onEditorCloseCallback: null, onAuthSuccess: null, onSignOut: null, onDownload: null, }A list of DocSpace events returned on certain actions within the SDK.
filterobject{ count: 100, page: 1, search: "", sortorder: "descending", sortby: "DateAndTime", withSubfolders: false, }The filter parameters for searching files in the DocSpace manager.
filter.countinteger100A number of files to be displayed.
filter.pageinteger1A page number.
filter.searchstring""A query to search for files.
filter.sortorderstring"descending"The sort order of files ("descending", "ascending").
filter.sortbystring"DateAndTime"The sort parameter ("DateAndTime", "AZ", "Type", "Size", "DateAndTimeCreation", "Author").
filter.withSubfoldersbooleanfalseSpecifies whether to exclude subfolders when searching for files.
filterParamstring"ALL"The filter parameters for selector mode ("ALL", "DOCX", "IMG", "GZ", "DOCXF", "XLSX", "BackupOnly").
frameIdstring"ds-frame"The frame SDK ID used to refer to the SDK instance.
heightstring"100%"The frame SDK height in percent.
idstringnullThe element ID for SDK initialization.
infoPanelVisiblebooleantrueSpecifies whether to display a button to show the info panel in the manager.
localestringnullThe language of the DocSpace user interface which is specified with the four letter language code.
modestring"manager"The SDK initialization mode. Values: "manager", "file-selector", "room-selector", "editor", "viewer", "system".
namestring"frameDocSpace"The name of the object inserted into the page. It is used for messaging at the SDK level.
requestTokenstringnullThe token used to open public rooms/files.
rootPathstring"/rooms/shared/"The path to the frame SDK. Opens a list of rooms by default.
selectorTypestring"roomsOnly"The selector type defining filters in the selector mode. Values: "roomsOnly", "userFolderOnly", "exceptPrivacyTrashArchiveFolders", "exceptSortedByTagsFolders".
showFilterbooleanfalseSpecifies whether the interface filter is displayed in the DocSpace manager.
showHeaderbooleanfalseSpecifies whether the header is displayed in the mobile view manager.
showMenubooleanfalseSpecifies whether the interface menu is displayed in the DocSpace manager.
showSelectorCancelbooleanfalseSpecifies whether Cancel button is displayed in the selector mode.
showSelectorHeaderbooleanfalseSpecifies whether the interface header is displayed in the selector mode.
showSettingsbooleanfalseSpecifies whether to display the Manage displayed columns button for configuring the table columns in the manager.
showSignOutbooleantrueSpecifies whether the Sign out button is displayed.
showTitlebooleantrueSpecifies whether the interface title is displayed in the DocSpace manager.
srcstring{PORTAL_SRC}The base URL to the DocSpace portal. It is used to generate links.
themestring"Base"The UI theme ("Base", "Dark", "System").
typestring"desktop"The platform type which is used by the browser and affects the parameters of the inserted object ("desktop", "mobile").
viewAsstring"row"The way elements are arranged in the DocSpace manager ("row", "table", "tile").
viewTableColumnsstring"Name,Type,Tags"The column names that are displayed for the table in the manager.
widthstring"100%"The frame SDK width in percent.
withBreadCrumbsbooleantrueSpecifies whether to display the breadcrumbs in the selector mode.
withSearchbooleantrueSpecifies whether to display Search in the selector mode.
withSubtitlebooleantrueSpecifies whether to display the filter parameters in the selector mode.

Example

const config = {
buttonColor: "#5299E0",
destroyText: "",
checkCSP: true,
disableActionButton: false,
downloadToEvent: false,
editorCustomization: {},
editorGoBack: true,
editorType: "desktop",
events: {
onSelectCallback: null,
onCloseCallback: null,
onAppReady: null,
onAppError: null,
onEditorCloseCallback: null,
onAuthSuccess: null,
onSignOut: null,
onDownload: null,
},
filter: {
count: 100,
page: 1,
search: "",
sortorder: "descending",
sortby: "DateAndTime",
withSubfolders: false,
},
filterParam: "ALL",
frameId: "ds-frame",
height: "100%",
id: null,
infoPanelVisible: true,
locale: null,
mode: "manager",
name: "frameDocSpace",
requestToken: null,
rootPath: "/rooms/shared/",
selectorType: "exceptPrivacyTrashArchiveFolders",
showFilter: false,
showHeader: false,
showMenu: false,
showSelectorCancel: false,
showSelectorHeader: false,
showSettings: false,
showSignOut: true,
showTitle: true,
src: {PORTAL_SRC},
theme: "Base",
type: "desktop",
viewAs: "row",
viewTableColumns: "Name,Type,Tags",
width: "100%",
withBreadCrumbs: true,
withSearch: true,
withSubtitle: true,
}