Basic samples
These samples each demonstrate a single DocSpace Embed SDK mode or method in isolation. Use them as a quick reference before combining several calls into a real integration, like the ones in Advanced samples.
Not every SDK method has a dedicated sample yet. For the complete list, see the SDK reference for the init methods and the SDKInstance reference for the instance methods.
Authentication and session
| Sample | Description |
|---|---|
| Create password hash | Generate a password hash using the DocSpace JS SDK. |
| Login | Log in to DocSpace using the JS SDK with password hashing. |
| Logout | Log out a user from the DocSpace session using the JS SDK. |
| Get hash settings | Retrieve hash settings from the DocSpace frame using the JS SDK. |
| Get user info | Retrieve user information using the DocSpace JS SDK. |
Frame initialization
| Sample | Description |
|---|---|
| Initialize frame | Initialize a DocSpace frame in the mode set by the mode config field. |
| Initialize manager | Initialize the DocSpace manager using the JS SDK. |
| Initialize editor | Open a document in the DocSpace editor using the JS SDK. |
| Initialize viewer | Embed a read-only document viewer using the JS SDK. |
| Initialize file selector | Initialize the DocSpace file selector using the JS SDK. |
| Initialize room selector | Embed the room selection interface using the JS SDK. |
| Initialize system | Initialize the DocSpace system interface using the JS SDK. |
| Destroy frame | Remove the embedded DocSpace iframe using the JS SDK. |
| Mark iframe as loaded | Mark the DocSpace iframe as loaded using the JS SDK. |
Frame configuration and UI
| Sample | Description |
|---|---|
| Get config | Retrieve the embedded frame configuration using the JS SDK. |
| Set config | Update the embedded frame configuration using the JS SDK. |
| Set list view | Change the file list display mode using the JS SDK. |
| Open modal | Open a modal window in DocSpace using the JS SDK. |
| Get selection | Retrieve the current selection in DocSpace using the JS SDK. |
Rooms and folders
| Sample | Description |
|---|---|
| Create room | Create a new shared room using the DocSpace JS SDK. |
| Get rooms | Retrieve available rooms using the DocSpace JS SDK. |
| Create folder | Create a folder in a DocSpace room using the JS SDK. |
| Get folders | Retrieve a list of folders from a room using the JS SDK. |
| Get folder info | Retrieve current folder information using the JS SDK. |
Files
| Sample | Description |
|---|---|
| Create file | Create a new file inside a DocSpace room using the JS SDK. |
| Get files | Retrieve a list of files from a room using the JS SDK. |
| Get files and folders list | Retrieve files and folders from a room using the JS SDK. |
Tags
| Sample | Description |
|---|---|
| Create tag | Create a custom tag in DocSpace using the JS SDK. |
| Add tags to room | Add custom tags to a DocSpace room using the JS SDK. |
| Remove tags from room | Remove tags from a DocSpace room using the JS SDK. |