Hub

The main method to embed the hub directly into the target page container.

hub(container:HTMLElement, options: HubEmbedOptions): hub
  • The container can be any legitimate HTML5 container - usually a DIV tag.
  • The Embed Hub template selection and settings for the embedded Hub are specified in the HubEmbedOptions object. This can include various properties and style settings .
  • The method returns an instance of the "hub" object, which has its own methods.

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.

const hubEmbedOptions = { theme: "dark", editable: true, showTabs: true, responsiveness: "compact", }; const myhub = client.hub($("myContainer"), options);