Evaluation Options Editor API Methods
getOptions()
Retrieves the evaluation options that are currently set in the editor.
You would want to use this method so that you can save the current options or pass them to Feedback Aide API in the options of a feedback session.
The result contains only the options that were loaded into the editor or that the author set. It does not contain the default values of other options.
Examples
// Read the options and log them
const options = await editor.getOptions();
console.log(options);
Arguments
None.
Return value
Type Promise
Resolves to a copy of the current options JSON object, or null if no options are set. Changing the copy does not change the options in the editor.
Caveats
- When the editor is created with the
variantoption set to"modal", the result contains the options you loaded and the options the author confirmed with the Confirm Options button. It does not contain unconfirmed changes. - When the editor is created with the
"default"variant, the promise can resolve to an empty object ({}) instead ofnull, for example, shortly after you attach the editor or call thereset()method. Treat bothnulland an empty object as no options set.
Related articles
- Evaluation options in the Feedback Aide API reference.