I have been exploring the new LeadingBlockBuilder feature for customizing the leading icons in unordered lists, and I’ve encountered some challenges. The goal is to apply different icons to unordered list items, allowing each list block within a document to have its own unique icon as seen in issue 1611. This new feature claims to do that, but based on the comments, I'm unsure whether the feature fully supports this use case or if there's a workaround or future plans to enhance it.
As of now, it seems that the current implementation does not persist these custom icons in the document's Delta format, or I could not figure it out.
Currently, when a custom icon is selected and applied, it is correctly displayed within the editor. However, upon saving and reloading the document, the custom icons revert to the default, because I can't figure out how to store the icon choice in the document's Delta. This is particularly limiting as it prevents the icons from being different in each block or, at a minimum, from being retained uniquely across different documents.
Any help or suggestions would be greatly appreciated!
Is there an existing issue for this?
The question
I have been exploring the new LeadingBlockBuilder feature for customizing the leading icons in unordered lists, and I’ve encountered some challenges. The goal is to apply different icons to unordered list items, allowing each list block within a document to have its own unique icon as seen in issue 1611. This new feature claims to do that, but based on the comments, I'm unsure whether the feature fully supports this use case or if there's a workaround or future plans to enhance it.
As of now, it seems that the current implementation does not persist these custom icons in the document's Delta format, or I could not figure it out.
Currently, when a custom icon is selected and applied, it is correctly displayed within the editor. However, upon saving and reloading the document, the custom icons revert to the default, because I can't figure out how to store the icon choice in the document's Delta. This is particularly limiting as it prevents the icons from being different in each block or, at a minimum, from being retained uniquely across different documents.
Any help or suggestions would be greatly appreciated!