angular-highlightjs

AngularJS directive for syntax highlighting with highlight.js
8 people use it
Author: 811518?v=3 pc035860

angular-highlightjs

AngularJS directive for syntax highlighting with highlight.js.

Demos

Requirements

  • Highlight.js (.js & .css)
  • AngularJS v1.0.1+

Getting started

  • Follow the instructions here to setup highlight.js.
  • Using a prebuilt version of highlight.js hosted at cdnjs here.
  • Include angular-highlightjs module script with AngularJS script on your page.
  • Add hljs to your app module's dependency. angular.module('myApp', ['hljs']);

Install with npm

npm install angular-highlightjs

Install with Bower

bower install angular-highlightjs

Configuration

Configuration works with highlight.js >= 8.0

In configuration phase, call hljsServiceProvider.setOptions() to configure with highlight.js options.

Directive usage

Visit the github repo for detailed directive usage docs.

comments powered by Disqus
This page was last updated over 2 years ago.