angular-highlightjs icon indicating copy to clipboard operation
angular-highlightjs copied to clipboard

HLJS content rendered event

Open nine-2-five opened this issue 9 years ago • 4 comments

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.

nine-2-five avatar Jul 31 '16 07:07 nine-2-five

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 avatar Aug 01 '16 03:08 pc035860

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

pc035860 avatar Aug 01 '16 03:08 pc035860

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.

ghost avatar Sep 23 '16 23:09 ghost

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

pc035860 avatar Sep 24 '16 01:09 pc035860