Understand all about the Plugins Client SDK.
The Plugins Client SDK acts as a bridge between a custom plugin and the Staffbase platform. A custom plugin is hosted outside the Staffbase platform and is embedded into the platform using iframe elements. Therefore it cannot access the methods in the platform frontend directly from within the iframe, as the browser prohibits the access. If you want to enhance your custom plugin with more information or mobile device-specific features, the plugin and the Staffbase platform need to interact in order to exchange information.
The Plugins Client SDK provides an API to access several features of the frontend application. With the Plugins Client SDK, custom plugin developers have greater flexibility in developing functionalities for the plugin, especially for mobile app users. They can call the methods to build specific functionalities.
The Plugins Client SDK contains two categories of methods:
-
Methods that give information about the context of the environment in which the application is running.
For example,
isIosDevice()
This method checks if the user is using an iOS device. -
Methods that allow the triggering of specific actions in the frontend application.
For example,
openLinkExternal(url)
This method allows the link to be opened in an external browser and not in the application itself.