Solved: Label content behaves differently with "Shift-Enter" when I enter a letter or number

Hi community

I have the correct position on the "M" key at the moment.
Bildschirmfoto 2022-07-06 um 15.03.59

I achieve this by inserting two Spaces after the M with 2 x "Shift-Enter".
Bildschirmfoto 2022-07-06 um 18.06.34

But if I now want to have a number "3" there instead of the letters "M"....
Bildschirmfoto 2022-07-06 um 18.07.29

... and then I press Enter, the Spaces are removed
Bildschirmfoto 2022-07-06 um 18.07.47

What can I do so that the number "3" would be at the same level as the number "2",?
Bildschirmfoto 2022-07-06 um 18.08.12

This happens because 2 is interpreted as a number (the spaces after it are ignored). Try this

2

 

(&nbps; is the html code for a non-breaking space)

That is great. Thanks Jean-Emmanuel...

One little more question:
If I write in the Label "+10" (as you said is interpreted as number)
That is working:
Bildschirmfoto 2022-07-06 um 20.08.38

But does it exist a shorter way to set "+10" as a string?

"+10" will work even if the " will disappear.
Yep maybe need to be improved.

That is really true... Thanks

Here's an unambiguous solution:

#{
`+10

`
}
1 Like

Yep

we can explore the flex way to handle the html

image

French : mais on perd la possibilité d'utiliser label. Quel sélecteur pour appliquer du style à <label> dans le bouton ? F12 m'a tué...
Autre question : comment récupérer l'id du bouton pour l'inclure dans le html ?

à ce propos la doc est un peu ambiguë

label étant un élément html, l'exemple donné fait référence à une règle de sélection pour une classe .label non ? Une typo ?

That is my solution... thanks

well not sure it will be ok for all cases

That's why i tried the flex way...

a proposal :slight_smile:

Edit 1 : Some errors in my previous post. So maybe this is more useful or not :slight_smile:

buttons-flex-html.json (1.3 KB)

Edit 2 : By the way, you can use font-awesome too :slight_smile:

Cheers

That looks great... I will check that tomorrow.
Thanks