If I create a flash.text.TextField using OpenFL for a JS target, none of my newline characters are showing up. The textfield instead has one long string on a single line.
I've tried changing .wordWrap
and .multiline
but they do nothing to change this behavior.
haxe 3.1.3 openfl-html5 1.4.2
Here is the file respoinsible for this behaviour. There is no handling of multiline property implemented currently, and no "\n"
handling also. So your only options would be to either transform the texts yourself, or implement that handling(and probably file a pull request to also help others).
Talking about "\r"
, I don't think it would or even should be implemented, because runtime system isn't the place to handle incorrect encodings.