slab / quill

Quill is a modern WYSIWYG editor built for compatibility and extensibility
https://quilljs.com
BSD 3-Clause "New" or "Revised" License
42.3k stars 3.31k forks source link

Syntax highlighting not working #4269

Open szlezakbartosz opened 1 week ago

szlezakbartosz commented 1 week ago

The syntax highlighting feature seems to be broken when using Quill in an Angular project (no wrappers, pure Quill.js):

Steps for Reproduction

  1. Visit https://stackblitz.com/edit/stackblitz-starters-6ms8v9?file=src%2Fmain.ts
  2. Create code-block, put some code in it, choose a language

It seems like the highlight.js function is not called at all as when inspecting the content there are no hljs css classes applied to the code-blocks: image

Expected behavior: Code syntax should be highlighted.

Actual behavior: Code syntax is not highlighted.

Platforms: Chrome 126.0.6478.114, Windows 10, Angular 18