blockId and userId in plugins

Changes in: app Permalink

Two new properties got added to our custom field types.

  • blockId : uid of the blok the field type plugin is active in
  • userId : id of the user that is currently using the interface
pluginCreated() {
      console.log('plugin:created', this.blockId, this.userId)
}

This will allow you to use the management API to access a list of collaborators and match with other information if needed to show in your custom field type. For that we recommend using a server side function (Lambda at AWS, …) to not have your management API token exposed to your internal users.