Imported from ether/ep_template_content (
AGENTS.md). Install upstream withnpx skills add ether/ep_template_content. Copyright stays with the author.
Agent Guide — ep_template_content
Adds the ability to insert pre-defined template content into a pad.
Tech stack
- Etherpad plugin framework (hooks declared in
ep.json) - EJS templates rendered server-side via
eejsBlock_*hooks - html10n for i18n (
locales/<lang>.json,data-l10n-idin templates)
Project structure
ep_template_content/
├── AGENTS.md
├── CONTRIBUTING.md
├── LICENSE.md
├── client.js
├── ep.json
├── index.js
├── locales/
│ ├── en.json
├── package.json
├── static/
│ ├── css/
│ ├── js/
│ ├── tests/
├── templates/
│ ├── editbarButtons.ejs
│ ├── template_content_input.ejs
Helpers used
None — ep_plugin_helpers is not a dependency. Adoption is part of the helpers-adoption sweep (Phase 4).
Helpers NOT used
To be audited in the helpers-adoption sweep (Phase 4).
Running tests locally
ep_template_content runs inside Etherpad's test harness. From an etherpad checkout that has installed this plugin via pnpm run plugins i --path ../ep_template_content:
# Backend (Mocha) — harness boots its own server
pnpm --filter ep_etherpad-lite run test
# Playwright — needs `pnpm run dev` in a second terminal
pnpm --filter ep_etherpad-lite run test-ui
Standing rules for agent edits
- PRs target
main. Linear commits, no merge commits. - Every bug fix includes a regression test in the same commit.
- All user-facing strings in
locales/. No hardcoded English in templates. - No hardcoded
aria-labelon icon-only controls — etherpad's html10n auto-populatesaria-labelfrom the localized string when (a) the element has adata-l10n-idand (b) no author-suppliedaria-labelis present. Adding a hardcoded Englisharia-labelblocks that and leaves it untranslated. (Seeetherpad-lite/src/static/js/vendors/html10n.ts:665-678.) - No nested interactive elements (no
<button>inside<a>). - LLM/Agent contributions are explicitly welcomed by maintainers.
Quick reference: hooks declared in ep.json
- Server:
eejsBlock_editbarMenuLeft,eejsBlock_styles,eejsBlock_body - Client:
postAceInit
When adding a hook, register it in both ep.json and the matching exports.<hook> = ... in the JS file.