0

I tried to copy the code but doesn't work. I'm using prism.js but when i use ngAfterViewChecked the copy does'nt work anymore.

when I add in my component :

public ngAfterViewChecked(): void {
     if (!this.highlighted) {
     this.highlightService.highlightAll();
     this.highlighted=true;
     }
  }

the copy doesn't work any more . Any solution please?

R. Richards
  • 24,603
  • 10
  • 64
  • 64
koukou
  • 23
  • 6
  • what do you mean the copy doesn't work anymore? Are you unable to copy the code from the highlighted code? – ViqMontana May 13 '19 at 11:36
  • i mean to copy the code from the highlighted code by clicking the toolbar Copy like in this link [link](https://auralinna.blog/post/2017/code-syntax-highlighting-with-angular-and-prismjs) – koukou May 13 '19 at 11:49
  • Could you try recreating your issue on [StackBlitz](https://stackblitz.com/) – ViqMontana May 13 '19 at 11:53
  • i creat the issue on StackBlitz , the copy worked but highlighting code no, i don't understand the problem in my local – koukou May 13 '19 at 13:12

0 Answers0