This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-30
Channels
- # aleph (25)
- # announcements (20)
- # babashka (29)
- # babashka-sci-dev (12)
- # beginners (27)
- # biff (3)
- # clojure (29)
- # clojure-europe (21)
- # clojure-nl (1)
- # clojure-norway (1)
- # clojurescript (3)
- # clr (5)
- # code-reviews (4)
- # data-science (7)
- # datahike (6)
- # datascript (3)
- # emacs (9)
- # fulcro (5)
- # graalvm (10)
- # malli (15)
- # nbb (7)
- # off-topic (17)
- # pathom (9)
- # polylith (4)
- # practicalli (15)
- # reitit (3)
- # releases (2)
- # rum (1)
- # shadow-cljs (73)
- # squint (34)
- # tools-deps (3)
- # xtdb (11)
Hi, (hopefully) simple question about using rum. I am converting a pre-existing website template to hiccup, and using rum to render. This template has some embedded js used to control the style, for example in the header
it contains markup like this:
[:header {:x-data "{\n navbarOpen: false,\n dropdownOpen: false\n }",
:class "scrolledFromTop ? 'bg-white dark:bg-dark bg-opacity-80 dark:bg-opacity-80 shadow-sticky backdrop-blur-sm' : 'bg-white dark:bg-dark' ",
::class "w-full flex items-center sticky top-0 z-50 wow fadeInUp", :data-wow-delay ".2s"} ...
Now, when this is rendered by rum the single quotes (see scrolledFromTop? _'_
) are escaped - I don’t want them escaped, I want this markup to be left as-is. I’ve seen dangerouslySetInnerHTML
, but I only want to ‘dangerously set’ inner html in a couple of places within the header, there are numerous other tags within the header that I want to be transformed as normal from hiccup. I presume there’s a simple way to accomplish this? Thanks in advance.