rum

Simple, decomplected, isomorphic HTML UI library for Clojure and ClojureScript | 0.12.8 https://github.com/tonsky/rum/blob/gh-pages/CHANGELOG.md#0128
2020-05-23T09:34:16.123900Z

Question , how can I type multi-line content in a div like: [:div "this is \n on two lines"]

2020-05-23T10:13:16.124300Z

Clojure strings are already multiline

2020-05-23T19:10:26.124600Z

I mean, they don't render the newline on the page

2020-05-23T19:11:05.125300Z

[:div "this is \n on two lines"]
or
[:div "this is
 on two lines"]
both just render a single line string. I'd like it to render with <br /> ?

sergey.shvets 2020-05-26T20:02:48.137700Z

I think

[:div [:span "this is"] [:br] [:span "on two lines"]] 
Should work. You need a br tag to do a new line in HTML. I'm sure you can write a helper function to split strings into spans/br based on new line symbol to make life easier for you

2020-05-26T20:17:03.137900Z

Ya, that's what I ended up doing, thanks!

2020-05-23T21:09:17.126800Z

Its okay though. I think for proper web HTML anyways, I should probably split my paragraphs with p tags, and not really rely on br anyways. And let the rest reflow automatically