# slate-prism

> A Slate plugin to highlight code blocks using PrismJS.

Latest version **0.5.0** (published 2018-03-25) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install slate-prism
pnpm add slate-prism
yarn add slate-prism
bun add slate-prism
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.0 |
| Published | 2018-03-25 |
| First published | 2016-07-29 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 27 |
| Maintainers | aarono, gitbook-bot, jpreynat, samypesse, soreine, zhouzi |
| Keywords | slate |

## Links

- npm: https://www.npmjs.com/package/slate-prism
- Repository: https://github.com/GitbookIO/slate-prism
- Homepage: https://github.com/GitbookIO/slate-prism#readme
- Issues: https://github.com/GitbookIO/slate-prism/issues
- npm.io page: https://npm.io/package/slate-prism

## Dependencies (1)

- [prismjs](https://npm.io/package/prismjs.md) ^1.13.0

## Alternatives

- [ext-list](https://npm.io/package/ext-list.md) — 6.3M weekly downloads
- [@lexical/selection](https://npm.io/package/@lexical/selection.md) — 3.8M weekly downloads
- [@lexical/text](https://npm.io/package/@lexical/text.md) — 3.6M weekly downloads
- [@lexical/clipboard](https://npm.io/package/@lexical/clipboard.md) — 3.0M weekly downloads
- [@tiptap/extension-mention](https://npm.io/package/@tiptap/extension-mention.md) — 3.0M weekly downloads

## Recent versions

- 0.5.0 (latest) — 2018-03-25
- 0.4.0 — 2017-11-08
- 0.3.0 — 2017-10-15
- 0.2.2 — 2016-12-05
- 0.2.1 — 2016-11-30
- 0.2.0 — 2016-08-23
- 0.1.4 — 2016-08-02
- 0.1.2 — 2016-07-30
- 0.1.1 — 2016-07-30
- 0.1.0 — 2016-07-29

## README

# slate-prism

[![NPM version](https://badge.fury.io/js/slate-prism.svg)](http://badge.fury.io/js/slate-prism)

A Slate plugin to highlight code blocks using PrismJS

### Install

```
npm install slate-prism
```

### Simple Usage

```js
import Prism from 'slate-prism'

const plugins = [
  Prism()
]
```

**Note:** You have to add a Prism theme CSS to your application.

#### Arguments

- ``[onlyIn: (Node) => boolean]`` — a filtering function to select code blocks.
- ``[getSyntax: (Node) => string]`` — a function to determine syntax for a code block.

---
_Source: https://npm.io/package/slate-prism · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
