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

I want to use concepts from pankat 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?

Here’s what I would try:

  1. Potentially elm-pages, 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, if you can go with <my-custom-element my-attr="13" /> instead of [[!input 13]].

1 Like

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!

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