PureScript FFI bindings for "react-rte" package.
It's work in progress, not published on pursuit yet, but it's working, I have used it in production. For now you can dirty copy-paste it or use as git-submodule.
- purescript-prelude
- purescript-eff
- purescript-generics
- purescript-nullable
- purescript-maybe
- purescript-react
Keep in mind that this example requires purescript-react-spaces.
value <- createValueFromString "some initial text" Markdown
-- …
onChange value = do
log $ valueToString value Markdown
-- …
-- …
richTextEditor ^ (richTextEditorDefaultProps value)
{ placeholder = toNullable $ Just "Type text here"
, onChange = toNullable $ Just $ handle onChange
}