pc035860 / angular-highlightjs

AngularJS directive for syntax highlighting with highlight.js
http://pc035860.github.io/angular-highlightjs/example/
MIT License
294 stars 53 forks source link

HLJS content rendered event #73

Open nine-2-five opened 8 years ago

nine-2-five commented 8 years ago

I have a large dataset that binds to a view with ng-repeat. Is there an event that triggers when the updated dom with hljs js and css is done? I need a height of the list so I can scrollTo bottom.

pc035860 commented 8 years ago

Hi @isvaljek ,

There's actually an undocumented attribute hljs-onhighlight or onhighlight. The expression in it will execute whenever the hljs directive starts to highlight the content.

If you want one for "after highlight", we'll have to add a new attribute like hljs-onafterhighlight.

pc035860 commented 8 years ago

You can try hljs-onhighlight first, see if it solves your problem.

ghost commented 7 years ago

What is the status of this? It would be useful to have a complete event too, so we know when the content is rendered. Could it be possible @pc035860 ? Thanks.

pc035860 commented 7 years ago

@gala132 I think the on documented hljs-onhighlight may solve the issue. No response from @isvaljek yet. You can try it yourself.