Toolbar options for text block VS list block

Hi,

What works as intended: the text block type is writer. As the documentation states, i can use the toolbar option to get a fixed toolbar with inline: false. The toolbar is now always visible on the preview and when editing the field in its dedicated drawer.

Now, i did the same with the list block type even if the documentation says nothing about the toolbar option for the list type. As expected i don’t have a fixed toolbar on the preview, but i do have it when opening the field in its drawer.

What would be the best way like for the writer field to display a fixed toolbar for the list item on its panel preview?

Thanks for your help!

Sean.

I think you have two options here:

  1. Use a writer field for the list block type instead of a list field, and limit the nodes to list nodes
  2. Create a custom list field (extending the existing one), and add the toolbar option as property.

Thanks, extending the list block was what i did but it wasn’t working on the preview because of the preview: list attribute.

So here is what i had that worked on the drawer but not the preview:

name: field.blocks.list.name
icon: list-bullet
wysiwyg: true
preview: list
fields:
  text:
    label: field.blocks.list.name
    type: list
    toolbar:
      inline: false

And here is what works on both:

name: field.blocks.list.name
icon: list-bullet
wysiwyg: true
preview: text
fields:
  text:
    label: field.blocks.list.name
    type: list
    toolbar:
      inline: false

Thanks for the solution and quick reply @texnixe!