You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use livedoc `editor` function as a reagent component in your cljs application
26
+
27
+
[nextjournal.clojure-mode.livedoc/editor opts]
28
+
29
+
this puts together an instance of CodeMirror with markdown and clojure mixed language support with a set of extensions configurable via an `opts` map with keys:
23
30
24
-
Compose results layout with `v/row` and `v/col`
31
+
*`:doc` (required) a markdown string
32
+
33
+
*`:render` a function taking a reagent state atom, returning hiccup. Such state holds a map with:
34
+
*`:text` the block's text
35
+
*`:type` with values `:code` or `:markdown`
36
+
*`:selected?`
37
+
38
+
*`:eval-fn!` will be called on selected block states when evaluation is triggered
39
+
40
+
*`:tooltip` customises tooltip view
41
+
42
+
*`:extensions` extra CodeMirror extensions to be added along livedoc ones
43
+
44
+
*`:focus?` should editor acquire focus when loaded
Use livedoc `editor` function as a reagent component in your cljs application
89
-
90
-
[nextjournal.clojure-mode.livedoc/editor opts]
91
-
92
-
this puts together an instance of CodeMirror with markdown and clojure mixed language support with a set of extensions configurable via an `opts` map with keys:
93
-
94
-
*`:doc` (required) a markdown string
95
-
96
-
*`:render` a function taking a reagent state atom, returning hiccup. Such state holds a map with:
97
-
*`:text` the block's text
98
-
*`:type` with values `:code` or `:markdown`
99
-
*`:selected?`
100
-
101
-
*`:eval-fn!` will be called on selected block states when evaluation is triggered
102
-
103
-
*`:tooltip` customises tooltip view
104
-
105
-
*`:extensions` extra CodeMirror extensions to be added along livedoc ones
106
-
107
-
*`:focus?` should editor acquire focus when loaded
0 commit comments