Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unclechu/purescript-react-rich-text-editor
PureScript FFI bindings for "react-rte" package
https://github.com/unclechu/purescript-react-rich-text-editor
ffi-bindings purescript purescript-foreign reactjs
Last synced: 28 days ago
JSON representation
PureScript FFI bindings for "react-rte" package
- Host: GitHub
- URL: https://github.com/unclechu/purescript-react-rich-text-editor
- Owner: unclechu
- License: mit
- Created: 2018-03-13T16:28:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-25T19:58:14.000Z (almost 6 years ago)
- Last Synced: 2024-11-07T09:52:50.403Z (3 months ago)
- Topics: ffi-bindings, purescript, purescript-foreign, reactjs
- Language: PureScript
- Homepage: https://github.com/sstur/react-rte
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# purescript-react-rich-text-editor
[PureScript][purescript] FFI bindings for ["react-rte"][rte] package.
It's work in progress, not published on [pursuit][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][submodule].## Requirements
- [purescript-prelude][purescript-prelude]
- [purescript-eff][purescript-eff]
- [purescript-generics][purescript-generics]
- [purescript-nullable][purescript-nullable]
- [purescript-maybe][purescript-maybe]
- [purescript-react][purescript-react]## Usage example
Keep in mind that this example requires [purescript-react-spaces][purescript-react-spaces].
```purescript
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
}
```## Author
[Viacheslav Lotsmanov](https://github.com/unclechu)
## License
[MIT](LICENSE)
[purescript]: http://www.purescript.org
[pursuit]: https://pursuit.purescript.org
[rte]: https://github.com/sstur/react-rte
[submodule]: https://www.git-scm.com/docs/gitsubmodules[purescript-prelude]: https://pursuit.purescript.org/packages/purescript-prelude/3.1.0
[purescript-eff]: https://pursuit.purescript.org/packages/purescript-eff/3.1.0
[purescript-generics]: https://pursuit.purescript.org/packages/purescript-generics/4.0.0
[purescript-maybe]: https://pursuit.purescript.org/packages/purescript-maybe/3.0.0
[purescript-nullable]: https://pursuit.purescript.org/packages/purescript-nullable/3.0.0
[purescript-dom]: https://pursuit.purescript.org/packages/purescript-dom/4.15.0
[purescript-react]: https://pursuit.purescript.org/packages/purescript-react/5.1.0[purescript-react-spaces]: https://pursuit.purescript.org/packages/purescript-react-spaces/1.0.1