Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@technik-sde/prosemirror-recreate-transform

Package Overview
Dependencies
Maintainers
43
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@technik-sde/prosemirror-recreate-transform

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

  • 1.0.1
  • npm
  • Socket score

Version published
Weekly downloads
961
decreased by-9.85%
Maintainers
43
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 31 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc