@technik-sde/prosemirror-recreate-transform
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

prosemirror-recreate-transform

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

This is a non-core module of ProseMirror. 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:

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
    }
);

Package Sidebar

Install

npm i @technik-sde/prosemirror-recreate-transform

Weekly Downloads

820

Version

1.1.0

License

Apache-2.0

Unpacked Size

599 kB

Total Files

38

Last publish

Collaborators

  • mhsz
  • florian.siegel.netlight
  • bagrat.ter-akopyan
  • chris-hold
  • jonas40000
  • szclentfort
  • moritz-schindelmann-nl
  • thomasnitschesz
  • sinksar
  • ccntrq
  • niklas.beinghaus
  • siwa-net
  • sharaalsz
  • bgeese-szdm
  • fm-sz
  • szdm-livingdocs
  • thlsz
  • sknl
  • j.kilgus
  • ms-sz
  • michscho
  • axmu
  • jannik.rau
  • vispercept
  • szdm-gitbot
  • dwd0tcom
  • szdm.de-team
  • szdm-pay
  • mawa
  • sz-magazin
  • etola
  • daraff
  • szdm-admin
  • jetztde
  • matthaias
  • daandi
  • sz.florian.fehrenbacher
  • brehmi
  • neovatar
  • jakob.kohl
  • ronald.ploeger
  • kloibers
  • ornellagiau
  • jkandler
  • felix.ifc
  • noackt
  • katharinasz
  • janstuemmel
  • etusak
  • gabrielhase
  • eiks