A lightweight Angular 20 app showcasing a custom code editor with live syntax highlighting, line numbers, and basic editing helpers. Designed for integration into Evergreen ILS.
- Live syntax highlighting via highlight.js
- Custom TT2 (Template Toolkit) syntax highlighting, originally built for the Evergreen Docs site and refined for this project
- Line numbers and cursor position indicator
- Tab/Shift+Tab indentation across single and multi-line selections
- File load/save using the File System Access API with a safe download fallback
src/app/components/code-editor/– standalone editor component (template, styles, behavior)src/app/services/syntax-highlighting.service.ts– highlight.js integration and language wiringsrc/app/services/language-grammars.ts– language configuration, including TT2
JavaScript/TypeScript, HTML/CSS, JSON, Markdown, Bash, Python, and TT2 (Template Toolkit). Additional highlight.js grammars can be added as needed.
- Install dependencies
npm install- Start the dev server
npm startOpen http://localhost:4200/ in your browser. The app reloads on file changes.
npm run buildOutputs production assets to dist/.
MIT
