# Syntax Highlighter

> Portable Text syntax highlighting for EmDash CMS with SSR rendering, line numbers, highlighted lines, and copy-to-clipboard.

Source: https://emdashcmseverything.com/plugins/syntax-highlighter/

- Category: Editor Experience
- Status: available
- Version: 0.1.1
- Price: Unknown
- Compatibility: EmDash >=0.1.0
- License: MIT
- Maintainer: Mason James
- Download: https://www.npmjs.com/package/@masonjames/emdash-syntax-highlighter
- Repository: https://github.com/masonjames/emdash-syntax-highlighter
- Published: 2026-11-01

Portable Text syntax highlighting for EmDash CMS with SSR rendering, line numbers, highlighted lines, and copy-to-clipboard.

## Installation

Install the package from npm:

```bash
npm install @masonjames/emdash-syntax-highlighter
```

Register the plugin in your Astro config:

```ts
// astro.config.mjs
import { defineConfig } from "astro/config";
import emdash from "emdash/astro";
import { syntaxHighlighterPlugin } from "@masonjames/emdash-syntax-highlighter";

export default defineConfig({
  integrations: [
    emdash({
      plugins: [syntaxHighlighterPlugin()],
    }),
  ],
});
```

## Details

- **Latest version:** 0.1.1
- **License:** MIT
- **Publisher:** Mason James
- **Requires:** EmDash `>=0.1.0`
- **Source repository:** [https://github.com/masonjames/emdash-syntax-highlighter](https://github.com/masonjames/emdash-syntax-highlighter)
- **npm package:** [@masonjames/emdash-syntax-highlighter](https://www.npmjs.com/package/@masonjames/emdash-syntax-highlighter)
