ca1989

ca1989

Rendering HTML in Livebook

I have a bunch of Phoenix Components.
May be possible to render them in a Livebook?

That would be absolutely brillant as a living documentation tool a-la Storybook.

Most Liked

LostKobrakai

LostKobrakai

I setup this on the weekend: phoenix.livemd · GitHub

10
Post #8
zachallaun

zachallaun

Would love to see a proof of concept of this! I think it’s definitely possible using a Smart Cell (Kino.SmartCell — Kino v0.19.0) but it may be possible using even simpler Kino features. The somewhat tricky thing may be injecting your app’s styles into the livebook.

tomekowal

tomekowal

So far, I have this
https://github.com/tomekowal/phoenix-playground
It would be nice to render the page in an iframe to not jump between tabs.
I’ll need to look through Kino docs if it supports something like that.

Last Post!

tomekowal

tomekowal

Brilliant! Thank you! That’s exactly what I needed. Using Kino.JS and adding the iframe via JS is clever!

Where Next?

Popular in Questions Top

vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement