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

[MD] some ergo.

parent 9249aba2
...@@ -52,13 +52,18 @@ markdownEditorCpt = R.hooksComponent "G.C.MarkdownEditor" cpt ...@@ -52,13 +52,18 @@ markdownEditorCpt = R.hooksComponent "G.C.MarkdownEditor" cpt
_ <- pure $ (d .= "innerHTML") $ compileMd $ fst editedMd _ <- pure $ (d .= "innerHTML") $ compileMd $ fst editedMd
pure $ pure unit pure $ pure unit
pure $ H.div { className: "markdown-editor" } [ pure $ H.div { className: "markdown-editor" }
H.div { className: "md" } [ [ H.div { className: "row"}
H.textarea { className: "form-control" [ H.div { className: "col-md-5" } [ H.div { ref, className: "html" } []]
, rows: 30 , H.div { className: "col-md-5" }
, on: {change: onChange ref editedMd} } [ H.text $ fst editedMd ] [ H.div { className: "md" }
[ H.textarea { className: "form-control"
, rows: 10
, on: {change: onChange ref editedMd}
} [ H.text $ fst editedMd ]
]
]
] ]
, H.div { ref, className: "html" } []
] ]
onChange :: forall e. R.Ref (Nullable Element) -> R.State String -> e -> Effect Unit onChange :: forall e. R.Ref (Nullable Element) -> R.State String -> e -> Effect Unit
......
...@@ -30,7 +30,7 @@ corpusLayoutCpt = R.staticComponent "G.P.Corpus.corpusLayout" cpt ...@@ -30,7 +30,7 @@ corpusLayoutCpt = R.staticComponent "G.P.Corpus.corpusLayout" cpt
--H.iframe { src: gargMd , width: "100%", height: "100%", style: {"border-style": "none"}} [] --H.iframe { src: gargMd , width: "100%", height: "100%", style: {"border-style": "none"}} []
] ]
gargMd = "https://hackmd.iscpif.fr/g9Aah4iwQtCayIzsKQjA0Q#" gargMd = "https://hackmd.iscpif.fr/g9Aah4iwQtCayIzsKQjA0Q#"
md = "# Hello world" md = "# Corpus name\n## Methodology"
newtype CorpusInfo = newtype CorpusInfo =
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