Rubric Editor API Methods
createEditor()
Creates the editor interface.
You would want to use this method when you want to create a new rubric editor instance, for example, when you want to create a new rubric editor in your application.
Examples
const editor = await rubricEditorApp.createEditor(
{
variant: 'default',
rubric_json: {...},
rubric_templates: {...}
}
);
Arguments
-
options object
Additional editor options.
The following properties are supported.
-
variant string
Specifies the editor layout to use for rubric editor. For example, when
modalis specified, the editor will display a button that opens the editor in a modal dialog.You would want to use this argument to specify the editor layout you want to use for the rubric editor.
Possible values
"default""modal"
-
rubric_json object
The rubric JSON to be loaded into the rubric editor.
You would want to use this argument to specify the existing rubric JSON you want to load into the editor.
Note The editor initializes in the edit view when a rubric JSON is provided, or in the create view when none is provided.
See Feedback Aide Rubrics for example rubrics.
-
rubric_templates object
The templates for the rubric editor. This is used to define the available templates for the rubric editor such as: analytic, holistic, short response general, and more.
You would want to use this to define your own templates or override the default templates or hide certain default templates.
By default, we group templates into the following categories:
-
essay: Templates for essay-type rubrics, for example, analytic, holistic. -
short_response: Templates for short response rubrics, for example, general, categorize, etc.
Important If any template group is set to
false, that template group will be ignored. This would be useful to ignore certain default template groups likeessay, for example.This argument should be a key/value object where each key is a template group name such as
"essay"or"short_response", and the value is an object with the following properties:-
namestring: The template name. -
templatesarray[object]: List of template objects, each containing:-
name: Template name. -
description: Template description. -
image: The image URL of the template. -
defaults: The default rubric JSON when the template is selected.
-
-
-
Return value
Type Promise
When the promise resolves, it will return a RubricEditor interface.
See this RubricEditor for more information.