# @technik-sde/prosemirror-recreate-transform

> Create a set of steps transforming one prosemirror json document to another

Latest version **1.1.0** (published 2020-04-08) · Apache-2.0 license · 1.5K weekly downloads

## Install

```sh
npm install @technik-sde/prosemirror-recreate-transform
pnpm add @technik-sde/prosemirror-recreate-transform
yarn add @technik-sde/prosemirror-recreate-transform
bun add @technik-sde/prosemirror-recreate-transform
```

## Health

**Score 45/100 (D)** — status: abandoned.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2020-04-08 |
| First published | 2020-03-31 |
| Weekly downloads | 1.5K |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10.0.0 |
| Dependencies | 6 |
| Unpacked size | 585.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | benimnetz, benurb, brehmi, chris-hold, danielschleindlsperger, fapple, felix.ifc, fojambit, francesco.schwarz.sz, gbadur, irenama, jakob.kohl, jetztde, jinnbeam, jkandler, jketterl, kloibers, leomelzer, mantela, matthaias, mawa, neovatar, noackt, ntnwlf, ornellagiau, rlass, ronald.ploeger, sagold, severin.schmid, stefan101, sz-broschec, sz-magazin, sz.christian.rodemeyer, sz.florian.fehrenbacher, szdm-admin, szdm-pay, torsten.kohn, vispercept |
| Keywords | prosemirror, change, tracking, merging, diffing |

## Links

- npm: https://www.npmjs.com/package/@technik-sde/prosemirror-recreate-transform
- npm.io page: https://npm.io/package/@technik-sde/prosemirror-recreate-transform

## Dependencies (6)

- [diff](https://npm.io/package/diff.md) ^4.0.2
- [rfc6902](https://npm.io/package/rfc6902.md) ^3.0.4
- [prosemirror-model](https://npm.io/package/prosemirror-model.md) ^1.9.1
- [prosemirror-transform](https://npm.io/package/prosemirror-transform.md) ^1.2.4
- [@types/prosemirror-model](https://npm.io/package/@types/prosemirror-model.md) ^1.5.0
- [@types/prosemirror-transform](https://npm.io/package/@types/prosemirror-transform.md) ^1.1.0

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads
- [@vorionsys/shared-constants](https://npm.io/package/@vorionsys/shared-constants.md) — 26 weekly downloads

## Recent versions

- 1.1.0 (latest) — 2020-04-08
- 1.0.1 — 2020-03-31
- 1.0.0 — 2020-03-31

## README

# prosemirror-recreate-transform

> reduced and modified fork of https://gitlab.com/mpapp-public/prosemirror-recreate-steps

This is a non-core module of [ProseMirror](http://prosemirror.net).
ProseMirror is a well-behaved rich semantic content editor based on
contentEditable, with support for collaborative editing and custom
document schemas.

Every change to the document is recorded by ProseMirror as a step. 
This module allows recreating the steps needed to go from document 
A to B should these not be available otherwise. Recreating steps 
can be interesting for example in order to show the changes between 
two document versions without having access to the original steps.

Recreating a `Transform` works this way:

```js
import { recreateTransform } from "@technik-sde/prosemirror-recreate-transform";

let tr = recreateTransform(
    startDoc, 
    endDoc, 
    {
        complexSteps: true, // Whether step types other than ReplaceStep are allowed.
        wordDiffs: false, // Whether diffs in text nodes should cover entire words.
        simplifyDiffs: true // Whether steps should be merged, where possible
    }
);
```

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