Author API Methods
getWidgetMetadata()
Gets the current metadata JSON of the widget being edited in an Item.
You would want to use this method so that you can display the Question metadata being edited in your application, for example.
Examples
var widgetMetadata = authorApp.getWidgetMetadata();
console.log(widgetMetadata);
Arguments
None.
Return value
Type object
The current Widget metadata JSON. See widgetMetadata for more information.
Type boolean
Returns false
if not in the Widget editor view.
Type definitions
-
widgetMetadata object
-
name string
Widget template name.
-
template_reference string
Widget template reference.
-
created_through string
Widget template name.
-
translated_through string
Widget template reference.
-
Related articles
- The
setWidgetMetadata()
method, which allows you to set the current Widget metadata.