How to ignore carriage return? \ doesn't work in this

When I have a long piece of text in a string, like this I usually use a \ and return to get it on another line so it’s not a mile long. But that doesn’t seem to work in Hype. What do you use?

hypeDocument.getElementById('TextDES').innerHTML = "The way trade winds blow and the position of Hispaniola’s mountains tend to bring more rain to the Dominican Republic side of the island.";

Hi,

You are using HTML so you need to use a <br>

Sorry, I didn’t clarify. I don’t want the final output to force a return, I just want the code in the code editor to be more manageable. You know how the code will just run off the right side of the page if you don’t have a return in it? But the return is just for the code editor window.

Oh, I see.

Yes it would be good if it did that. But you can use " + "

    	"blow and the position of Hispaniola’s mountains tend to  bring more" + 
    	"rain to the Dominican Republic side of the island.";```
1 Like

Thank you. That does work. It’s a little clunky though. Hope they fix the editor so the \ works like in other editors.

Thanks for the feedback. While there’s reasons to change the editor altogether, Hype’s text editor is the same one as Tumult HyperEdit which can do softwrapping, so it is really a matter of exposing this as a preference. I’ve added this request to our tracker.

1 Like