# @lexical/code-core

> This package contains the base functionality code blocks for Lexical, it is a transitional package for internal use while the @lexical/code API is cleaned up.

Latest version **0.51.0** (published 2026-09-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @lexical/code-core
pnpm add @lexical/code-core
yarn add @lexical/code-core
bun add @lexical/code-core
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; popular repo.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.51.0 |
| Published | 2026-09-17 |
| First published | 2026-03-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 5 |
| Unpacked size | 191.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 23876 |
| Maintainers | fantactuka, zurfyx, acywatson, ipavlov001, trueadm, etrepum |
| Keywords | lexical, editor, rich-text, code |

## Links

- npm: https://www.npmjs.com/package/@lexical/code-core
- Repository: https://github.com/facebook/lexical
- npm.io page: https://npm.io/package/@lexical/code-core

## Dependencies (5)

- [lexical](https://npm.io/package/lexical.md) 0.51.0
- [@lexical/html](https://npm.io/package/@lexical/html.md) 0.51.0
- [@lexical/utils](https://npm.io/package/@lexical/utils.md) 0.51.0
- [@lexical/internal](https://npm.io/package/@lexical/internal.md) 0.51.0
- [@lexical/extension](https://npm.io/package/@lexical/extension.md) 0.51.0

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [jwt-simple](https://npm.io/package/jwt-simple.md) — 259.5K weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads

## Recent versions

- 0.51.0 (latest) — 2026-09-17
- 0.51.1-nightly.20260925.0 (nightly) — 2026-09-25
- 0.45.1-dev.0 (dev) — 2026-05-30
- 0.51.1-nightly.20260924.0 — 2026-09-24
- 0.51.1-nightly.20260923.0 — 2026-09-23
- 0.51.1-nightly.20260922.0 — 2026-09-22
- 0.51.1-nightly.20260921.0 — 2026-09-21
- 0.51.1-nightly.20260918.0 — 2026-09-18
- 0.50.1-nightly.20260917.0 — 2026-09-17
- 0.50.1-nightly.20260916.0 — 2026-09-16
- 0.50.1-nightly.20260915.0 — 2026-09-15
- 0.50.1-nightly.20260914.0 — 2026-09-14
- 0.50.1-nightly.20260911.0 — 2026-09-11
- 0.50.1-nightly.20260910.0 — 2026-09-10
- 0.50.1-nightly.20260909.0 — 2026-09-09
- … 129 more at https://npm.io/package/@lexical/code-core/versions

## README

# `@lexical/code-core`

[![See API Documentation](https://lexical.dev/img/see-api-documentation.svg)](https://lexical.dev/docs/api/modules/lexical_code-core)

This package contains the base functionality for the code blocks and code highlighting for Lexical. This package
is considered an implementation detail and is being used transitionally while the deprecated highlighting
functionality is still available in `@lexical/code`.

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