getWidgetMetadata - Methods - Author API

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

Was this article helpful?

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