Hey folks! I've recently written a post detailing ...
# multiplatform
m
Hey folks! I've recently written a post detailing how to embed KMP into Medium. https://medium.com/@mmartosdev/embedding-compose-multiplatform-code-into-medium-articles-cc1141f5db34 Hope you like it! cc: @Sebastian Aigner
j
Screenshot 2024-06-20 at 09.34.37.png
🫠 1
m
If you encounter any issues viewing it (on any browser or device), please let me know, as some people have reported Content Security Policy issues.
@John O'Reilly url fixed 😅
👍 1
a
You can embed Compose even in more simple way - with play.kotlinlang.org. And the Compose code will be editable.
Copy code
<iframe src="<https://pl.kotl.in/2xEBaBb4h?from=40&to=42>" width="800" height="600"></iframe>
m
Probably yes, @Alexander Zhirkevich, but my aim was to provide rich media (interactive elements, animations, etc.) to readers. For this particular use case, the underlying code isn't as important as the content being shown.
a
It is fully interactive, the same as your but all the code is in one file and it is compiled dynamically instead of hosting on gh pages. Good for small samples
👍 1
r
Getting this on Chrome on Mac
2
m
@Rok Oblak any particular extension installed or setting different from regular install? Also try it on incognito mode to see if issue is fixed.
r
Hm I just reloaded now and it works 🙂
🙌 1
j
Firefox on Windows shows an empty box.
👀 1
m
@Jacob Ras, that’s strange. I’ve tested it on Windows using Chrome, Edge, and Firefox. The last one takes a while to properly render the content. Try reloading without the cache (Control + F5). If it still fails, try using incognito mode.
j
Strange, it works in a different FF profile. In my main one, where it doesn't work, in the console I see
GLctx is undefined
, coming from the coroutine exception handler. So at least some code is being executed