# @gdquest/codemirror-freeze

> Setups a Codemirror view to "freeze" code between specific comment tags.

Latest version **0.1.2** (published 2023-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @gdquest/codemirror-freeze
pnpm add @gdquest/codemirror-freeze
yarn add @gdquest/codemirror-freeze
bun add @gdquest/codemirror-freeze
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2023-09-27 |
| First published | 2023-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 98.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | GDQuest |
| Maintainers | adamscott, razcore-rad, nathan_gdquest, xananax |
| Keywords | gdquest, codemirror, extension, freeze, readonly |

## Links

- npm: https://www.npmjs.com/package/@gdquest/codemirror-freeze
- npm.io page: https://npm.io/package/@gdquest/codemirror-freeze

## Recent versions

- 0.1.2 (latest) — 2023-09-27
- 0.1.1 — 2023-09-27

## README

# @gdquest/codemirror-freeze

## `freeze()` extension

### Purpose

This extension setup a Codemirror view to "freeze" code between specific comment tags.

By default, `freeze()` has `"start-freeze"` and `"end-freeze"` as keywords, but it is customizable by passing the new names in parameter.

### Usage

```javascript
import { basicSetup } from "codemirror";
import { EditorView } from "@codemirror/view";
import { javascript } from "@codemirror/lang-javascript";
import { freeze } from "@gdquest/codemirror-freeze";

new EditorView({
  extensions: [basicSetup, javascript(), freeze()],
  doc: `
Hello. This is editable.

// start-freeze
This is frozen. Cannot change this line.
// end-freeze

This part is editable.
`.trim(),
});
```

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