# @curvenote/prosemirror-utils

> Utils library for ProseMirror

Latest version **1.0.5** (published 2022-11-23) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @curvenote/prosemirror-utils
pnpm add @curvenote/prosemirror-utils
yarn add @curvenote/prosemirror-utils
bun add @curvenote/prosemirror-utils
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2022-11-23 |
| First published | 2022-08-03 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 100.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Eduard Shvedai |
| Maintainers | fwkoch, rowanc1, stevejpurves |
| Keywords | ProseMirror, utils, helpers |

## Links

- npm: https://www.npmjs.com/package/@curvenote/prosemirror-utils
- Repository: https://github.com/curvenote/@curvenote/prosemirror-utils
- npm.io page: https://npm.io/package/@curvenote/prosemirror-utils

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2022-11-23
- 1.0.4 — 2022-08-03

## README

# Utils library for ProseMirror

[![@curvenote/prosemirror-utils on npm](https://img.shields.io/npm/v/@curvenote/prosemirror-utils.svg)](https://www.npmjs.com/package/@curvenote/prosemirror-utils)
[![License](https://img.shields.io/npm/l/@curvenote/prosemirror-utils.svg?style=flat-square)](http://www.apache.org/licenses/LICENSE-2.0)
![CI](https://github.com/curvenote/editor/workflows/CI/badge.svg)

This is a port of [prosemirror-utils](https://github.com/atlassian/prosemirror-utils) to typescript and updating dependencies and build.

## Quick Start

Install `@curvenote/prosemirror-utils` package from npm:

```sh
npm install @curvenote/prosemirror-utils
```

## Public API documentation

### Utils for working with `selection`

@findParentNode

@findParentNodeClosestToPos

@findParentDomRef

@hasParentNode

@findParentNodeOfType

@findParentNodeOfTypeClosestToPos

@hasParentNodeOfType

@findParentDomRefOfType

@findSelectedNodeOfType

@isNodeSelection

@findPositionOfNodeBefore

@findDomRefAtPos

### Utils for working with ProseMirror `node`

@flatten

@findChildren

@findTextNodes

@findInlineNodes

@findBlockNodes

@findChildrenByAttr

@findChildrenByType

@findChildrenByMark

@contains

### Utils for document transformation

@removeParentNodeOfType

@replaceParentNodeOfType

@removeSelectedNode

@replaceSelectedNode

@canInsert

@safeInsert

@setParentNodeMarkup

@selectParentNodeOfType

@removeNodeBefore

@setTextSelection

## License

- **Apache 2.0** : http://www.apache.org/licenses/LICENSE-2.0

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