Interactive-Design-and-Technology / interactive-learning

Generate Interactive Learning Activities for your LMS using JavaScript.
https://interactive-design-and-technology.github.io/interactive-learning/
0 stars 2 forks source link

Generate HTML & Code Highlighting #22

Closed FeXd closed 1 year ago

FeXd commented 1 year ago

Following up on progress from #16, wrap the code that is generated in a code highlighting library. (Arlin will post comment with recommended solution, but can't remember name right now.)

Update generator to include <script> tag with all the required JavaScript, and HTML, so that users would be able to copy and then paste everything in the generator into their Learning Management System without modification to have it working.

The code highlighting library may have "copy" functionality so that we don't have to code from scratch.

FeXd commented 1 year ago

I remember! It's Prism! This is what is being used currently in D2L Brightspace.

https://prismjs.com/

FeXd commented 1 year ago

Created a branch to show how we'd use Prism.js and Copy to Clipboard, you can see the branch and file here: https://github.com/Interactive-Design-and-Technology/interactive-learning/commit/4b7eb97f7a305b4e18ac7985c1ccb737427ba206

FeXd commented 1 year ago

Some cleanup has been done and Prism.js support has been added.

Generating the HTML still needs to be complete.

Check out the code-highlight branch if you'd like to see progress.