Rubric Editor API Methods
setRubric()
Loads the provided rubric and enters the edit mode.
You would want to use this method when you want to load a rubric JSON into the editor, for example, when you want to edit an existing rubric loaded from your database.
Examples
await editor.setRubric({...});
Arguments
-
rubric object
The rubric JSON object to load into the editor.
-
options object
Optional settings for loading the rubric.
The following properties are supported.
-
silent boolean
Controls whether the
changeevent should be emitted.When set to
true, thechangeevent will not be emitted.You would want to use this argument to load a rubric without triggering the
changeevent.Default:
false -
strict boolean
Controls whether the rubric should be validated against the schema.
If set to
true, the editor will validate the rubric against our predefined rubric schema and reject if invalid.If set to
false, the editor will only validate the rubrictype.You would want to use this argument when your rubric contains additional properties that are not part of the schema.
Default:
true
-
Return value
Type Promise
Resolves when the rubric is loaded, or rejects if invalid.