helix

https://github.com/Lokeh/helix
y.khmelevskii 2020-02-17T06:49:02.283600Z

Hi @lilactown. There is any good way to add html entities in render https://dev.w3.org/html5/html-author/charref ? For example I need to use   but I dont have any good idea how I can do it. It would be great to use something like this: ($ "  ")

y.khmelevskii 2020-02-17T06:49:53.284200Z

currently I’m able to do it only via dangerouslySetInnerHTML (d/span {:dangerouslySetInnerHTML #js {:__html " "}})

lilactown 2020-02-17T07:07:52.284800Z

unfortunately, in React there's not a great way to do this out of the box

lilactown 2020-02-17T07:08:17.285200Z

you could use escape characters

lilactown 2020-02-17T07:14:54.286400Z

(d/div "foo bar \u00A0 baz") => <div>foo bar baz</div>

lilactown 2020-02-17T07:17:47.287500Z

you could have some constants that refer to the specific char codes you need.

(def nbsp "\u00A0")

(def middot "\u00B7")
etc.

y.khmelevskii 2020-02-17T19:52:34.287700Z

got it, thank you