Angular Rich Text Editor With Highlight.Js Integration

Sample date Updated on Feb 10, 2026
angular angular-rich-text-editor ej2 highlightjs htmleditor rich-text-editor

This repository is a minimal Angular sample demonstrating how to integrate Highlight.js with a Rich Text Editor to provide syntax highlighting for code blocks entered into the editor.

Quick start

Prerequisites:

  • Node.js 20.x (recommended). Also supported: Node.js 22.x or 24.x
  • npm

Install dependencies and run the app:

npm install
ng serve

Open http://localhost:4200/ in your browser.

What this sample shows

  • How to set up Highlight.js in an Angular app and include a theme stylesheet
  • How to automatically highlight code blocks within the Rich Text Editor on content change.

References

Up arrow