I thought about that! It was mainly two things (tho I know there is the downside of decreased type-safety when using some random custom element and random custom props):
-
since I’m not only focusing on storybook-like documents, it would be great to be able to use elm components wherever I want in the markdown. Including in the middle of other tags (using the “displayInline” option) - this is trivial when using dillonkearns/elm-markdown. when I first explored the idea you mentioned it seemed trickier but thinking about it now it is less tricky and it opens up a few possibilities (based on other recent feedbacks…) - I’ll keep exploring it
-
working with markdown and elm is a bit of a painful experience. there is no syntax highlighting. no autoformat or anything. so I thought that separating both steps would enable code generation more easily since you can split the writing of markdown somewhere else and then just replace the string on the elm file… even on the markdown-in-elm approach I found it simple to just move components around without thinking about the boundaries between text and components.
but its definitely an interesting idea! thanks for bringing it in. I’m putting a pile of feedback together for future work. thanks!