diff --git a/gabc.js b/gabc.js index 3349f9a..06b95cc 100644 --- a/gabc.js +++ b/gabc.js @@ -68,7 +68,7 @@ class GregoChant extends HTMLElement { // prefer slotted nodes const assigned = this._slot.assignedNodes({ flatten: true }) || []; - let gabc = assigned.length ? this._gabcTextFromNodes(assigned) : this.innerText.trim(); + let gabc = assigned.length ? this._gabcTextFromNodes(assigned) : this.textContent.trim(); if (!gabc) return; // still empty, wait for future content this._initializeWithGabc(gabc); @@ -78,14 +78,15 @@ class GregoChant extends HTMLElement { if (this._initialized) return; this._initialized = true; - this.score_src = gabc; + this.score_src = gabc.replaceAll("GABCSPACE"," "); + console.log(this.score_src); const ctxt = new exsurge.ChantContext(); ctxt.lyricTextFont = "'Crimson Text', serif"; ctxt.lyricTextSize *= 1.2; ctxt.dropCapTextFont = ctxt.lyricTextFont; ctxt.annotationTextFont = ctxt.lyricTextFont; this._ctxt = ctxt; // store context for _doLayout - + const mappings = exsurge.Gabc.createMappingsFromSource(ctxt, this.score_src); const useDropCap = this.getAttribute('use-drop-cap') !== 'false'; this.score = new exsurge.ChantScore(ctxt, mappings, useDropCap); diff --git a/style.css b/style.css index 5b92492..99fe501 100644 --- a/style.css +++ b/style.css @@ -726,6 +726,10 @@ ol li ol li ol { .block[data-taxon="Exercise"] { background-color: rgba(255, 215, 45, 0.12); } +.block[data-taxon="Ordo"] { + font-family:"Crimson Text"; + font-size:larger; +} .block[data-taxon="Solution"]:hover { background-color: rgba(255, 255, 255, 0.32); }