Templating within texts
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
Templating within texts
Please implement other things than + within text .
Example : [colour=blue] toto [\colour]
Same with font , underline and everything you can do.
Example : [colour=blue] toto [\colour]
Same with font , underline and everything you can do.
Bruno
- TrianguloY
- Posts: 109
- Joined: Thu Jan 24, 2019 9:46 am
Re: Templating within texts
You mean on item labels? Basic html is allowed, you can write
<p style="color:blue">toto</p>
and the label will be blue.
<p style="color:blue">toto</p>
and the label will be blue.
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
- TrianguloY
- Posts: 109
- Joined: Thu Jan 24, 2019 9:46 am
Re: Templating within texts
But a binding for an item label?
'<p style="color:blue">'+$ll_second+'</p>'
'<p style="color:blue">'+$ll_second+'</p>'
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
Re: Templating within texts
Yes fine like that but not with a variable
AlrmFr = '<p style="color:blue">' + Jour + JourN + MoisF + Heure + '</p>';
return AlrmFr;
AlrmFr = '<p style="color:blue">' + Jour + JourN + MoisF + Heure + '</p>';
return AlrmFr;
Bruno
- TrianguloY
- Posts: 109
- Joined: Thu Jan 24, 2019 9:46 am
Re: Templating within texts
That works for me (when I set that code as the binding label of an item, and with those Jour/Mois/Heure variables defined).brunoisa10 wrote: ↑Wed Jan 30, 2019 10:14 pmYes fine like that but not with a variable
AlrmFr = '<p style="color:blue">' + Jour + JourN + MoisF + Heure + '</p>';
return AlrmFr;
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
Re: Templating within texts
My bad.TrianguloY wrote: ↑Wed Jan 30, 2019 9:50 pmBut a binding for an item label?
'<p style="color:blue">'+$ll_second+'</p>'
Works like a charm.
Thanks a bunch
Bruno
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
- TrianguloY
- Posts: 109
- Joined: Thu Jan 24, 2019 9:46 am
Re: Templating within texts
Because with html tags, newlines are ignored. Use <br> instead
"<p>blabla<br>blabla</p>"
Also make sure you change the maximum number of lines as needed.
For other questions, just search about html (keep in mind not everything works)
"<p>blabla<br>blabla</p>"
Also make sure you change the maximum number of lines as needed.
For other questions, just search about html (keep in mind not everything works)
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
Re: Templating within texts
br is giving many separation lines (seems 3 here)TrianguloY wrote: ↑Wed Jan 30, 2019 10:53 pmBecause with html tags, newlines are ignored. Use <br> instead
"<p>blabla<br>blabla</p>"
Also make sure you change the maximum number of lines as needed.
For other questions, just search about html (keep in mind not everything works)
nvm : Line-height is saving me
Bruno
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
Re: Templating within texts
Thanks a ton @TrianguloY
'<font color="green">' + $ll_hour24 + '</font>' +'<font color="blue">' + '<br>' + $ll_minute + '</font>' + '<font color="white" >' + '<br>' + $ll_second +'</font>'
For displaying Hour Min Sec on différents colors and each on a new line
'<font color="green">' + $ll_hour24 + '</font>' +'<font color="blue">' + '<br>' + $ll_minute + '</font>' + '<font color="white" >' + '<br>' + $ll_second +'</font>'
For displaying Hour Min Sec on différents colors and each on a new line
Bruno