enchant.Label Error: New line characters <br/>, \n, \r don't work on enchant.Label!
Closed this issue · 3 comments
Hi guys,
I am trying to create an enchant.Label that can spread multiple lines. However, it seems that the normal
, \n, \r characters don't work with enchant.Label?
I have taken a look at enchant.js source code and saw that enchant.Label split() its String content using the
tag. However, despite inserting
tag in the middle of the String passed to enchant.Label(), my enchant.Label is still one-line instead of multiple lines. I have been scratching my head for several hours now and still cannot figure out the way to achieve this.
Does anyone know how to fix this issue or how to create a multiple-lines enchant.Label? All answers are appreciated!
Do you mind giving an example of the string you're using for the label's .text property? I haven't had a problem using br in the past.
Label uses br tag to line breaking.
Valid formats of tag are "<br>", "<br/>" and "<br />". (uppercase are also valid).
Hi guys,
Nevermind it was working again. However, I feel like enchant.js should have a way to allow CSS positioning & styling of elements such as labels or text in dialog, etc.. I will be working on an enchant plugin like that when I have time. Thank you for all your support :D