Load abcjs from npm package

This also loads abcjs without script-loader.

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2021-06-06 18:16:44 +02:00
parent fddd97391b
commit fa1ed66088
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
5 changed files with 30 additions and 22 deletions

View file

@ -20,6 +20,7 @@ import Plugin from 'markdown-it-regexp'
import mermaid from 'mermaid'
import handlebars from 'handlebars'
import 'gist-embed'
import abcjs from 'abcjs'
require('prismjs/themes/prism.css')
require('prismjs/components/prism-wiki')
@ -415,7 +416,7 @@ export function finishView (view) {
$value = $(value)
const $ele = $(value).parent().parent()
window.ABCJS.renderAbc(value, $value.text())
abcjs.renderAbc(value, $value.text())
$ele.addClass('abc')
$value.children().unwrap().unwrap()