cipchk / ngx-highlight-js

Angular for syntax highlighting with highlight.js
https://cipchk.github.io/ngx-highlight-js/
MIT License
28 stars 4 forks source link

hljs.highlightElement is not a function using angular 16 #22

Open Derexx opened 1 year ago

Derexx commented 1 year ago

Hello. I am using angular version 16 and ngx-highlight-js doesn't work. Show me this error:

hljs.highlightElement is not a function at ngx-highlight-js.mjs:46:22

I tried with highlight-js 16.0.0 and 14.0.0 versions

cipchk commented 1 year ago

I wonder if highlight.js cannot be loaded successfully because of network reasons?

cipchk commented 1 year ago

Maybe the loaded hightlight version is too low?

Derexx commented 1 year ago

Problem solved updating highlight.js version to 11,8,0. Thanks!