initial commit

This commit is contained in:
Julie Blanc 2026-01-19 22:14:03 +01:00
commit abbd549428
97 changed files with 97614 additions and 0 deletions

View file

@ -0,0 +1,21 @@
import { Handler } from '/csspageweaver/lib/paged.esm.js';
export default class myCustomHandler1 extends Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller);
}
beforeParsed(content){
// let h2 = content.querySelectorAll('h2');
// h2.forEach( h2 => {
// h2.insertAdjacentHTML("afterbegin", '🍄');
// });
}
afterParsed(parsed) {
console.info("%c [CSS Page Weaver] Example custom handler 1 with afterParsed hook (see js/custom-handler-example-1.js", 'color: green;');
}
}

View file

@ -0,0 +1,16 @@
import { Handler } from '/csspageweaver/lib/paged.esm.js';
export default class myCustomHandler2 extends Handler {
constructor(chunker, polisher, caller) {
super(chunker, polisher, caller);
}
afterPageLayout(pageElement, page, breakToken) {
if(pageElement.id == "page-1"){
console.info("%c [CSS Page Weaver] Example custom handler 2 with afterPageLayout hook (see js/custom-handler-example-2.js", 'color: green;')
}
}
}