<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[text formatting]]></title><description><![CDATA[<p dir="auto">Dear all,<br />
I want to ask if there is a way and if someone know how is possible with UIFlow to take the text with some space and empty line and convert it in a text with each word in one different line. Thank you and regards.</p>
<p dir="auto">Example:<br />
<strong>text BEFORE:</strong><br />
TEXT1       TEXT2</p>
<p dir="auto">TEXT3</p>
<p dir="auto"><strong>text AFTER:</strong><br />
TEXT1<br />
TEXT2<br />
TEXT3</p>
]]></description><link>https://community.m5stack.com/topic/1878/text-formatting</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 22:36:45 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/1878.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Apr 2020 15:25:50 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to text formatting on Sat, 25 Apr 2020 20:50:50 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/fonzies83" aria-label="Profile: fonzies83">@<bdi>fonzies83</bdi></a>  try this commands</p>
<p dir="auto"><img src="/assets/uploads/files/1587847760098-img_20200425_224437444_hdr-2-resized.jpg" alt="0_1587847750162_IMG_20200425_224437444_HDR~2.jpg" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/8366</link><guid isPermaLink="true">https://community.m5stack.com/post/8366</guid><dc:creator><![CDATA[robalstona]]></dc:creator><pubDate>Sat, 25 Apr 2020 20:50:50 GMT</pubDate></item><item><title><![CDATA[Reply to text formatting on Sat, 25 Apr 2020 15:45:01 GMT]]></title><description><![CDATA[<p dir="auto">Thank you for your answer. But maybe I post wrong my question. The string was not always the same, every time the space between the various text can change. So there is the possibility with some loop to format different strings that are incoming in this form:<br />
TEXT1<br />
TEXT2<br />
TEXT3<br />
Because my problem is that is the string arrive like this:<br />
TEXT1</p>
<p dir="auto">TEXT2<br />
etc.<br />
I'm not able to see it in the m5 stick display. I need a sort of formatting when the string arrive before display it.</p>
<p dir="auto">Thank you and regards.</p>
]]></description><link>https://community.m5stack.com/post/8360</link><guid isPermaLink="true">https://community.m5stack.com/post/8360</guid><dc:creator><![CDATA[fonzies83]]></dc:creator><pubDate>Sat, 25 Apr 2020 15:45:01 GMT</pubDate></item><item><title><![CDATA[Reply to text formatting on Tue, 21 Apr 2020 18:02:02 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
wiht the Execute code of the advanced section you can enter python code, because if you take the replace block in the text section the '\n' will be changed by UIFlow into '\n'.<br />
See my UIFlow-Example:<br />
<img src="/assets/uploads/files/1587492003841-parse_string-resized.png" alt="0_1587491992793_parse_string.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">... and the following is the python code of my example:</p>
<hr />
<p dir="auto">from m5stack import *<br />
from m5ui import *<br />
from uiflow import *</p>
<p dir="auto">setScreenColor(0x222222)</p>
<p dir="auto">label0 = M5TextBox(0, 30, "Text", lcd.FONT_DejaVu18,0xFFFFFF, rotate=0)<br />
label1 = M5TextBox(0, 120, "Text", lcd.FONT_DejaVu18,0xFFFFFF, rotate=0)<br />
rectangle0 = M5Rect(0, 100, 320, 5, 0xFFFFFF, 0xFFFFFF)</p>
<p dir="auto">str_original = None<br />
str_parse = None</p>
<p dir="auto">str_original = ''<br />
str_parse = ''<br />
str_original = 'TEXT1 TEXT2\n\nTEXT3'<br />
label0.setText(str(str_original))<br />
str_parse = str_original.replace(' ', '\n')<br />
str_parse = str_parse.replace('\n\n', '\n')<br />
label1.setText(str(str_parse))</p>
]]></description><link>https://community.m5stack.com/post/8298</link><guid isPermaLink="true">https://community.m5stack.com/post/8298</guid><dc:creator><![CDATA[Gaviota]]></dc:creator><pubDate>Tue, 21 Apr 2020 18:02:02 GMT</pubDate></item></channel></rss>