latex4ei / tex4tum

Interactive Learning Platform
https://www.tex4tum.de
6 stars 7 forks source link

Handle Javascript in Markdown Files #24

Closed hofbi closed 4 years ago

hofbi commented 7 years ago

For the interactive content there is some JS in the markdown files. How should we handle this?

emareg commented 7 years ago

Maybe we could require that interactive diagrams / content is bundled into a separate markdown file that is included into the main article file

hofbi commented 7 years ago

We could also move the JS to a seperate .js file and include them. With this we get our markdown files "clean" from JS, so they are easy to read for most of the users. If there is somebody wants to contribute interactive content he has to step more into detail. With this we could introduce some parameters for including the JS to make some JS reuseable.

emareg commented 7 years ago

Clean from JS but we would still have html tags in the markdown file to access certain text spans by element. Furthermore we would separate the manipulated content from the manipulating logic which lowers the cohesion. I would suggest splitting according to content topic or static/interactive rather than by interpreter language.

hofbi commented 7 years ago

But putting the whole JS together could be helpful to create an object oriented structure as suggested in #9