Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

convert a markdown string to purescript-dom's types #47

Open
legrostdg opened this issue Jun 1, 2017 · 1 comment
Open

convert a markdown string to purescript-dom's types #47

legrostdg opened this issue Jun 1, 2017 · 1 comment

Comments

@legrostdg
Copy link

In my purecript-halogen app, I'd like to be able to convert some markdown contained in a string (which is repatriated with purescript-affjax) to purescript-dom's types.

As I understand it, this app provides a text input for the user to provide markdown, and then convert it to html. Would it be possible to split it into two parts?

@garyb
Copy link
Member

garyb commented Jun 3, 2017

If you want it to just construct a DOM tree then you could try running a component "purely" to extract the rendered vdom and render that to actual DOM nodes... but I think probably what you're after would be better off as separate library. Taking the route I just described will perhaps be a bit of effort to make it work out, and it would probably be easier to spend that energy on writing an alternative renderer instead.

I'm perhaps not quite understanding what you want to do though, as if you already are using Halogen, then it would seem like you could use this component as it is?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants