# Dynamic html content creation with input fields based on Markdown + special syntax

**URL:** <https://discourse.elm-lang.org/t/dynamic-html-content-creation-with-input-fields-based-on-markdown-special-syntax/9318>\
**Category:** Request Feedback\
**Created:** [September 12, 2023, 4:00pm UTC](https://discourse.elm-lang.org/t/dynamic-html-content-creation-with-input-fields-based-on-markdown-special-syntax/9318 "2023-09-12T16:00:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![qknight](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/qknight/32/4990_2.png) [@qknight](https://discourse.elm-lang.org/u/qknight)\
**Post date:** [September 12, 2023, 4:00pm UTC](https://discourse.elm-lang.org/t/dynamic-html-content-creation-with-input-fields-based-on-markdown-special-syntax/9318/1 "2023-09-12T16:00:34Z")

</div>

I want to use concepts from [pankat](https://lastlog.de/blog/pankat_editor.html) for a tool in education.

Requirements:

1. **content is written as markdown** and stored in files but the **webserver creates html from it, on the fly** , when a client visits the document
2. At some places in the article, using a special syntax **[[!input 13]]** the html generator will then create an **input form field with an submit button** , where a student can enter his answer. The answer is then written to the database on submit.

How would I solve these issues in Elm?

---

<div class="post-metadata">

**Author:** ![lydell](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/lydell/32/178_2.png) [@lydell](https://discourse.elm-lang.org/u/lydell)\
**Post date:** [September 12, 2023, 4:25pm UTC](https://discourse.elm-lang.org/t/dynamic-html-content-creation-with-input-fields-based-on-markdown-special-syntax/9318/2 "2023-09-12T16:25:59Z")

</div>

Here’s what I would try:

1. Potentially [elm-pages](https://elm-pages.com/), not sure. (The requirements are fuzzy to me. What is the reason for the web server having to create HTML, and on the fly? You might get away with something simpler and possible more interactive if you don’t have that constraint.)

2. [dillonkearns/elm-markdown](https://elm.dmy.fr/packages/dillonkearns/elm-markdown/latest/), if you can go with `<my-custom-element my-attr="13" />` instead of `[[!input 13]]`.

---

<div class="post-metadata">

**Author:** ![qknight](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/qknight/32/4990_2.png) [@qknight](https://discourse.elm-lang.org/u/qknight)\
**Post date:** [September 12, 2023, 4:54pm UTC](https://discourse.elm-lang.org/t/dynamic-html-content-creation-with-input-fields-based-on-markdown-special-syntax/9318/3 "2023-09-12T16:54:26Z")

</div>

For 1. I should have written that I parts of the content is basic html which is now known during compile time of elm.

For 2. That custom tag like concept looks adaptable.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [September 22, 2023, 4:54pm UTC](https://discourse.elm-lang.org/t/dynamic-html-content-creation-with-input-fields-based-on-markdown-special-syntax/9318/4 "2023-09-22T16:54:35Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
