init - Methods - Question Editor API

Question Editor API Methods

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

Type object

Returns the instance of the Question Editor API app. See questionEditorApp methods for more information.

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.