Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Encoding a line break in a string without using HTML

Is there a way to encode a line break into a string without using any HTML entities or tags? Specifically, I would like a string that I pass into the dojox.gfx renderer to display a line break.

like image 577
allenylzhou Avatar asked Feb 11 '26 15:02

allenylzhou


1 Answers

You can escape it with \n or \u000A, see:

How do I break a string across more than one line of code in JavaScript?

like image 66
ckg Avatar answered Feb 13 '26 08:02

ckg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!