Aligment of bullet list in Rich Text Block

Hello!
I use Rich Text Block in my widget filled with text dynamically from Text array. Rich Text block is set to Auto-wrap = true, and the Text field contains bullet points (just a symbol •) to represent bullet list from Microsoft Word or LibreOffice Writer

So the question is: How can I make every line after bullet point • automatically be aligned with the beginning of the first word?

I want from that:

• Lorem ipsum dolor sit amet,
consectetur.

to that:

  • Lorem ipsum dolor sit amet,
    consectetur.

I read about custom decorator class for Rich Text Block, but seems like it’s more about text style but not for aligment.

I will appreciate any help!

I’m not sure what you are using to create the bullet you have. If you have managed to paste a character for it then idk how to accomplish what you want. If you’re using the Rich Text image Decorator like the one described in the latter half of this tutorial,

then what you can do is create a version of the bullet in the RichTextImageRow Data Table that is exactly the same except you set the “Draw As” parameter to “None”. Then you can place that bullet at the beginning of the lines without an actual bullet. This will create an invisible bullet at those location so you have a space of the same size in those locations.
This does mean you’ll have to specifically define where your lines wrap in the text box, unfortunately

1 Like

Thank you for answer!

Yeah, mostly I want to paste a character. But your solution should work for image bullet point(like in video). So, as I understand, there will be two images. The first with bullet point image and the second blank and transparent(but it’s the same size as the first one).

Another solution I found is to use WebBrowserWidget instead of RichTextBlock. Bullet list supported by HTML+CSS out of the box.

And the third one is the hardest but interesting. Based on modifying engine text wrapping implementation. Here is the guidance how text wrapping works in Unreal Engine.
This can be also used for text block justification by the left and rigth border simultaniosly. Cause justification works only for left border or only for right border separatly.
image

1 Like

No problem. the idea of using the web browser to render html had not occurred to me. That could be really useful for more complex text

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.