Skip to content

A code editor component for Angular web applications. Designed for use in Evergreen ILS.

IanSkelskey/eg-code-editor

Repository files navigation

Evergreen Code Editor

Evergreen Code Editor

Demo

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.

Screenshot

Editor screenshot (TypeScript)

Highlights

  • 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

What’s in this repo

  • src/app/components/code-editor/ – standalone editor component (template, styles, behavior)
  • src/app/services/syntax-highlighting.service.ts – highlight.js integration and language wiring
  • src/app/services/language-grammars.ts – language configuration, including TT2

Supported languages (core)

JavaScript/TypeScript, HTML/CSS, JSON, Markdown, Bash, Python, and TT2 (Template Toolkit). Additional highlight.js grammars can be added as needed.

Run locally

  1. Install dependencies
npm install
  1. Start the dev server
npm start

Open http://localhost:4200/ in your browser. The app reloads on file changes.

Build

npm run build

Outputs production assets to dist/.

License

MIT

About

A code editor component for Angular web applications. Designed for use in Evergreen ILS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published