Commit 9b3afc61 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[MD] some ergo.

parent 9249aba2
......@@ -52,14 +52,19 @@ markdownEditorCpt = R.hooksComponent "G.C.MarkdownEditor" cpt
_ <- pure $ (d .= "innerHTML") $ compileMd $ fst editedMd
pure $ pure unit
pure $ H.div { className: "markdown-editor" } [
H.div { className: "md" } [
H.textarea { className: "form-control"
, rows: 30
, on: {change: onChange ref editedMd} } [ H.text $ fst editedMd ]
]
, H.div { ref, className: "html" } []
]
pure $ H.div { className: "markdown-editor" }
[ H.div { className: "row"}
[ H.div { className: "col-md-5" } [ H.div { ref, className: "html" } []]
, H.div { className: "col-md-5" }
[ H.div { className: "md" }
[ H.textarea { className: "form-control"
, rows: 10
, on: {change: onChange ref editedMd}
} [ H.text $ fst editedMd ]
]
]
]
]
onChange :: forall e. R.Ref (Nullable Element) -> R.State String -> e -> Effect Unit
onChange ref (_ /\ setEditedMd) e = do
......
......@@ -30,7 +30,7 @@ corpusLayoutCpt = R.staticComponent "G.P.Corpus.corpusLayout" cpt
--H.iframe { src: gargMd , width: "100%", height: "100%", style: {"border-style": "none"}} []
]
gargMd = "https://hackmd.iscpif.fr/g9Aah4iwQtCayIzsKQjA0Q#"
md = "# Hello world"
md = "# Corpus name\n## Methodology"
newtype CorpusInfo =
CorpusInfo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment