Block metadata UI

I want a “parameter” block type, that has text (the parameter label) and content (paragraphs explaining the parameter), and some metadata (the parameter’s internal ID).

It would be preferable to have the ID visible and editable alongside the label/content (as opposed to, say, appearing in a pop-up/sidebar only when the cursor is in the block).

Is it possible to make a block type that shows one or more input fields as part of its HTML rendering, allowing you to enter/edit block metadata?

Alternately, could I make the content pattern of the block type something like internalid paragraph+ to force an “internalid” block as the first child of a “parameter” block, and have the user enter the internal ID there?

Thanks!

Only with a node view, and you’ll have to wire up those fields yourself to make sure that changes in them get propagated to the ID attribute (assuming it is stored as a node attribute).

Alternately, could I make the content pattern of the block type something like internalid paragraph+ to force an “internalid” block as the first child of a “parameter” block, and have the user enter the internal ID there?

That should work.