Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add html / h block attribute to render static DOM generated by Elm #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kachkaev
Copy link
Member

@kachkaev kachkaev commented Jul 15, 2018

TODO: figure out how we can use native div, p, etc. functions something like toHtml (like we do with specs using toVegaLite).

Thought: Should we reserve h / html for printing raw HTML like we do in case of j / json and use something like d / dom when rendering Elm DOM?

@folkertdev
Copy link

It would be great to have html render support. Are you aware of eeue56/elm-static-html-lib? It's a great package by Noah that renders elm apps (given a model) to static html strings.

@kachkaev
Copy link
Member Author

@folkertdev we are currently executing Elm code with run-elm, which returns us serialized data rather than executable JS functions. I guess that elm-static-html-lib expects the latter, but feel free to correctly if I'm wrong.

@folkertdev
Copy link

The result of elm-static-html-lib is an html string (Html.p [] [ text "some text"] => <p>some text</p>)
It's pretty flexible so if that stringification of html is something you want then this is the way in 0.18.

I assume this will all be easier once the compiler supports server-side rendering, but that seems delayed for a while. May make sense to ask Evan and Noah what the plans are in this area first.

@kachkaev kachkaev changed the base branch from master to main September 5, 2020 21:18
@rolojf
Copy link

rolojf commented Oct 7, 2022

I am sorry, I can't help with this. I not as smart.
It would be great to have this working.
Trying to draw some things using ianmackenzie/elm-3d-scene and svg's.

Thanks

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

Successfully merging this pull request may close these issues.

None yet

3 participants