This is a lower-level API. Lower-level APIs are not recommended for most projects, and may not be available on all plans. See our page on recommended deployment patterns for more information.
Public Method Question Editor API

init()

A method called on window.LearnosityQuestionEditor to instantiate an instance of the Question Editor. Once called, and finished initializing (see callbacks for more info on when the API is considered in 'ready' state), you can use the returned application instance (called questionEditorApp in this documentation) to access its public methods.

This function must be called before any other functionality can be used.

Arguments

  • initOptions object

    Object containing Question Editor config parameters.

  • selector string

    DOM element where Question Editor should be rendered into.

    For example, if you pass .my-question-editor as the second argument, you should change the div class value from learnosity-question-editor to my-question-editor.

    Default: '.learnosity-question-editor'

  • callbacks object

    Visit the Question Editor API callback object for detailed documentation on callbacks and its parameters.

Return value

questionEditorApp

Was this article helpful?