• Resolved edhomex

    (@edhomex)


    Hey there, I have been struggling to find a solution to what I thought would be a straightforward issue: allowing list formatting in my custom Gutenberg blocks.

    I do not want to use the default List block because that means I have to convert ALL of my custom blocks into an Innerblock/Outerblock setup in order to use it. I simply want to enable list formatting in the toolbar, just like you would for bold/italic etc.

    I have not been able to find an example of this being done anywhere.

    I am looking for any insight/suggestions on how I might achieve this.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support David Smith

    (@get_dave)

    Hi @edhomex,

    Sorry to hear you’ve been struggling.

    Unfortunately this isn’t a use case that the editor has yet been able to address. I appreciate that’s probably not what you want to hear, but there are many competing priorities and it hasn’t yet been addressed.

    One option you have is looking into the Format API to register your own list format.

    To quote from the docs

    …a format is a HTML tag with text-level semantics

    Other than that I would recommend looking for Plugins that have solved this problem. I’m not personally aware of one, but there could be an option out there if the Format API doesn’t work out for you.

    Lastly, if there’s a feature you feel is missing from the editor I would encourage you to consider raising an Issue in the Github repo or raising it in the Core Editor chat that happens every week.

    I hope that helps a little?

    Thread Starter edhomex

    (@edhomex)

    @david thanks for the response. It was definitely helpful, I will see what I can do with the other options you provided. Take care.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘List formatting inside Gutenberg block?’ is closed to new replies.