Combine the design capabilities of Ceros with the power of object-oriented programming
The Ceros Software Development Kit (SDK) is a set of tools that help you unlock creative solutions to problems. By leveraging our prewritten SDK Extensions and this guide, you can extend the native functionality of the Ceros platform.
The SDK Panel is the place to locate identifying information about your Experience as well as assign Tagsand Payloads to help you programmatically handle your content.
With the Ceros SDK, there are two basic ways to identify something: Tags and IDs. SDK Tags are values you can enter in the SDK Panel in order to identify an object or page. With out pre-built quiz extensions, for example, we identify each question page with the Tag question and each result page with results so that they can be managed easily within the code. After typing in a Tag, hit enter to apply it to the target object or page.
NOTE: You can add multiple tags to a single target object.
In Ceros, each Experience, Page, and Component have unique identifiers. These IDs can be used to locate a specific instance of your target in order to read its attributes or manipulate it.
Every Page and Component has an information entry area called a Payload. In contrast to Tags, which are commonly applied to multiple targets and used for classification, Payloads generally contain unique information. For instance, our SDK Audio plugin uses the payload field to hold the URL of an MP3 file that the Studio reads in order to play sound in an Experience.
NOTE: A Component or Page can only have one Payload.
To start using the power of the SDK, we have to reference it. Our standard method is to use RequireJS to point at the Ceros SDK with an Anonymous Module Definition (AMD). Example code below! There are two ways to integrate your code with a Ceros Experience. Take a look below and choose the one that best fits your development workflow.
The easiest way to make sure your code is scoped correctly is to wrap it in an anonymous function that is immediately invoked to run the code when the page loads.
You can insert your own code into an Experience by using the Custom HTML tab in the Studio’s Settings panel. Set up some opening and closing script HTML tags, then you can start writing your own custom code.