Skip to content

ajcrites/ngx-prism-highlight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prism Highlight

This is an adaptation of the prismjs library that works as an Angular component.

Installation

Install prism-highlight with your favorite package manager.

You will also need to install prismjs. Make sure that you import the the libraries and styles you need from PrismJS itself. For example, in main.ts:

import 'prismjs';
import 'prismjs/components/prism-typescript';
import 'prismjs/themes/prism.css';
import 'prismjs/themes/prism-dark.css';

Usage

This module exports a single directive, prism-highlight that takes the language for highlighting as an input.

<pre prism-highlight="typescript">${tsCode}</pre>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published