• Kim

    (@spacewell)


    Hi there,

    It seems impossible to ad an “id” attribute to a list item in the “List” block. I was assuming there would be a “HTML ANCHOR” field in the block editing column for a “list Item” but there isn’t.

    Adding the id attribute manually by editing the block’s html directly like this:

    <li id="some-id">List item content</li>

    … results in “This block contains unexpected or invalid content.” With the button “Attempt Block Recovery”. When clicking this button the “id” attribute will be stripped out.

    Is there any other way to add an “id” attribute to a list item in the List block?

    I know I can create a custom list in the “Custom HTML” block but I think it is a bit strange this is not possible in the “List” block’s “List Item”.

    • This topic was modified 1 year, 4 months ago by Kim.
Viewing 1 replies (of 1 total)
  • Thread Starter Kim

    (@spacewell)

    For anyone encountering this issue and finding the post;

    It is possible to wrap the content of the list item in a span with and “id” attribute. Like this:

    <li><span id="some-id">List item content</span></li>

    For me this is a bit of a dirty fix since it needs an extra html tag were there shouldn’t be.

Viewing 1 replies (of 1 total)
  • The topic ‘Adding an “id” attribute to a list item in the List block’ is closed to new replies.