Ive searched but cant seem to find the answer:
I have the following html:
var html = "< div >< a >1</ a >< a >2</ a > < a >3</ a >< a >4</ a >< a >5</ a >< div >"
when I use editor.setValue(html) it shows as one line. Now if I add \r\n at the end of each line then it properly line formats it but doesnt have tab indent. Is adding \r\n even the correct way.
I can't understand your question, probably github have changed formatting of your comment, please use
- code here -
to preserve formatting of your code.
is just one line.
Here is a string with multiple lines and tabs
var html = "many\nlines\n\t\t\t\tand even tabs"
var html = "<div>\r\n\t<a>1</a>\r\n\t<a>2</a>\r\n\t<a>3</a>\r\n\t<a>4</a>\r\n\t<a>5</a>\r\n<div>";
Thanks. I thought that ace automatically formatted the code when added.
@adviner if the answers fulfill your question, i'd suggest you to close the issue.