MurhafSousli / ngx-highlightjs

Angular syntax highlighting module

Home Page:https://ngx-highlight.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using ngx-highlightjs in stand-alone components

woutersteven opened this issue · comments

Question about stand-alone components

With standalone components becoming the norm after Angular 14. A working example of how to import and use ngx-highlightjs with standalone components, what to import in app.module.ts or main.ts if it is bootstrapped there, and which configuration to put where.

As well as what to import in the component file itself. As well as how to use additional functionality such as the highlightAll() function in the JS library.

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [X] question

Versions

Angular 14, 15, 16, any OS.

Desired functionality

A working example of how to import and use ngx-highlightjs with standalone components, what to import in app.module.ts or main.ts if it is bootstrapped there, and what to import in the component file itself. As well as how to use additional functionality such as the highlightAll() function in the JS library.