Tools for generating the Volumetric Regimes book https://volumetricregimes.xyz/ (wiki-to-print, using Paged.js)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

22 lines
576 B

class hyphenopoly extends Paged.Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller);
}
beforeParsed(content) {
// add lang fr to all sections
content.querySelectorAll("section").forEach(section => {
section.setAttribute("lang", "en-us")
})
Object.keys(Hyphenopoly.setup.selectors).forEach(sel => {
content.querySelectorAll(sel).forEach(elem => {
Hyphenopoly.hyphenators["HTML"].then((hyn) => {
hyn(elem, sel);
});
});
});
}
}
Paged.registerHandlers(hyphenopoly);