Content (Object)
The Content object represents an instantiated instance of content embedding - generated by calling the content method. It contains metadata of embedded content item.
In older versions of the API, this functionality was exposed via the EmbeddedResult object which is now deprecated. Developers should access the result of content embedding via the content object instead.
Constructors
- There is NO constructor for EmbeddedResult. The EmbeddedResult is loaded into the onLoad event triggered from the EmbedOptions object defined for the embed method.
Methods
- goToSlide- method to make the dashboard jump to a specific slide number
Properties
- queries: Query[] - an array of queries that are contained in the result.
- contentType - gets the type of embedded content
Constructors
- There is NO constructor for Hub object.
Methods
- changeSelectedTab(index)- method to change the selected tab in a running hub to the provided index.
-
getSelectedTab - method to return the current selected tab's index
- getTabsList - method to return a list of all tabs in an array object
Example
The following snippet creates the embed hub options object and then loads the hub through the hub method into "myContainer." "myhub" is the returned instance from the method.
The script then switches the hub to tab #4 (index 3) using the changeSelectedTab method.
const hubEmbedOptions = {
theme: "dark",
editable: true,
showTabs: true,
responsiveness: "compact",
};
const myhub = client.hub($("myContainer"), options);
myhub.changeSelectedTab(3);