Suggest Block

A question whose answer is completed from a vocabulary the author picked.

Try it


Developer Reference

Schema

Pass this object inside the blocks option when calling initBridge() to register this block type with the admin UI. See Custom Blocks for the full setup guide.

{
  "fieldsets": [
    {
      "id": "default",
      "title": "Default",
      "fields": [
        "label",
        "suggestFrom",
        "value"
      ]
    }
  ],
  "properties": {
    "label": {
      "title": "Question"
    },
    "suggestFrom": {
      "title": "Suggest from",
      "widget": "vocabularySelect",
      "vocabularyFilter": "Keywords|Subject"
    },
    "value": {
      "title": "Answer"
    }
  },
  "required": []
}

JSON Block Data

Example JSON as stored in the Plone content API. This is the data structure your component will receive in the block prop.

{
  "@type": "suggest",
  "label": "Topic",
  "suggestFrom": "plone.app.vocabularies.Keywords",
  "value": ""
}

Rendering

How this block renders in your frontend. Add its handling to your renderer, or — for list-style blocks — register a fetcher and reuse your list rendering.