Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

120
Views
Prismjs not highlighting typescript code snippets

I was toying around with Prism.js and for some reason, highlighting typescript code is not working as intended. Prism.js couldn't event tokenize the snippet...

Here is a demo within codesandbox

Any help/idea is appreciated.

almost 4 years ago · Santiago Trujillo
1 answers
Answer question

0

When imported as a module, Prism by default does not include all languages (otherwise the bundle would be very large). Prism only includes the common/popular/most used languages like HTML, CSS, JavaScript, and even Markdown.

To add TypeScript, you have to import the component like this:

import Prism from "prismjs";
import "prismjs/themes/prism-twilight.css";
import "prismjs/components/prism-typescript";

Codesandbox

almost 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!