
Product
Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.
@favware/syntax-highlighter-react
Advanced tools
Table of Contents
There are many syntax highlighters avaliable already but most of those are either complex to setup or front end framework specific.
@favware/syntax-highlighter-coreis built using StencilJS. You can use it everywhere, i.e. Angular, React, Vue, any framework, No Framework!This is an adoptation of snippet-highlight from rahulbhooteshwar
monospaceyarn add @favware/syntax-highlighter-core @favware/syntax-highlighter-react
# or npm install @favware/syntax-highlighter-core @favware/syntax-highlighter-react
The syntax is kept fairly simple. Here's a basic example of some simple JavaScript code:
import { SyntaxHighlighter } from '@favware/syntax-highlighter-react';
<SyntaxHighlighter theme="dark" language="javascript" content="import { SyntaxHighlighter } from @favware/syntax-highlighter-react" />;
To limit the size of this library a selection has been made from all langauges supported by PrismJS. The chosen languages are those that we consider the most popular / common. If you want to see another languages supported you're always free to open an issue
javascript, typescript, asciidoc, autohotkey, autoit, bash, batch,
c, clike, clojure, coffeescript, cpp, csharp, csp, css, dart,
diff, docker, elixir, gherkin, git, go, graphql, groovy, http,
ini, java, json, jsx, kotlin, less, lua, makefile, markdown,
nginx, objectivec, powershell, python, ruby, rust, sass, scala,
scss, sql, swift, tsx, vim, visual-basic, wasm, wiki, yaml
FAQs
React bindings for @favware/syntax-highlighter-core
We found that @favware/syntax-highlighter-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.

Research
/Security News
A new npm package tests AI malware scanners with prompt injection, safety-triggering comments, context flooding, and obfuscated JavaScript.