questionsApp - Methods - Question Editor API

Question Editor API Methods

questionsApp()

Returns the Questions API instance being used by Question Editor API when editing a widget (used by the set validation area and the preview area).

This instance exposes the public methods (see return value link for exposed public methods.) for use to customise behavior, or getting data directly from it not otherwise exposed by Question Editor API.

Examples

// Example 1: Validate answer in the preview area
questionEditorApp.questionsApp().validateQuestions();

// Example 2: Get feature and stop video playing (e.g. with custom button)
const features = authorApp.editorApp().questionsApp().features();

Object.values(features).forEach(function(feature) {
    feature.video.stop();
});

Arguments

None.

Return value

Type Questions API

Versioning

Version added: v2021.3.LTS

Was this article helpful?

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