Glossary Hovercard Publisher
Help an educator add contextual definitions to existing lesson HTML using a reviewed glossary and longest-phrase matching. Preserve code and links, support keyboard-accessible definitions, and export a standalone annotated lesson with a reusable glossary file.
An annotated HTML lesson, glossary.json and a term-coverage report
- TypeScript Typed local transformations and portable browser interfaces run with Node standard libraries.
Glossary Hovercard Publisher in 4 stages
Explain unfamiliar terms inside the page people are reading.
Validate terms, aliases and original definitions
validateGlossary(value: unknown): Term[]
starter · ~2 hours · TypeScript
Validate terms, aliases and original definitionsMatch phrases inside eligible text nodes
matchTerms(text: string, terms: Term[]): Match[]
core · ~2 hours · TypeScript
Match phrases inside eligible text nodesRender accessible definitions in context
annotateLesson(html: string, terms: Term[]): {html: string; coverage: Coverage[]}
core · ~2 hours · TypeScript
Render accessible definitions in contextExport the lesson and reusable glossary bundle
publishGlossary(lesson: string, terms: Term[]): {html: string; glossary: Term[]; coverage: Coverage[]}
stretch · ~2 hours · TypeScript
Export the lesson and reusable glossary bundle