Adding Javascript to Course in a Box


Hi @dirk
Do you know if it would be possible to include this javascript file in my Course in a Box?


It would allow me to include music notation directly in the modules.

Please let me know your thoughts.

Thank you!


Hey @matt5834

Yes, that is totally possible!

Add the vextab JavaScript file to your repository in the /js folder.

Put a script tag in the base layout file after the highlighted lines.

The code you need to add is

<script src="{{site.baseurl}}/js/vextab-div.js"></script>

After that you can use the notation like in their example:

<div class="vex-tabdiv"
      width=680 scale=1.0 editor="true"
      editor_width=680 editor_height=330>options space=20
    key=A time=4/4

    notes :q =|: (5/2.5/3.7/4) :8 7-5h6/3 ^3^ 5h6-7/5 ^3^ :q 7V/4 |
    notes :8 t12p7/4 s5s3/4 :8 3s:16:5-7/5 :h p5/4
    text :w, |#segno, ,|, :hd, , #tr

  options space=25

Ask if you get stuck anywhere and please share a link when you get this set up!