New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@emergence-engineering/prosemirror-text-map

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emergence-engineering/prosemirror-text-map

![made by Emergence Engineering](https://emergence-engineering.com/ee-logo.svg)

  • 0.1.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
241
increased by1.26%
Maintainers
0
Weekly downloads
 
Created
Source

prosemirror-text-map

made by Emergence Engineering

Made by Emergence-Engineering

A library for manipulating ProseMirror documents in text format.

Convert a ProseMirror document to text, do the work, then map back positions in the text to the ProseMirror document.

This lib is mostly helpful for situations where you use other libraries whose working on texts only (like diffing, parsing, etc.) and you need to map back the results to the ProseMirror document (like adding marks based on text change).

use docToTextWithMapping to create a mapping object & textPosToDocPos to map text positions to document positions.

You can use an additional mapping option which could help you to serialise a node to a different format, this could be helpful for example if you want to add images to the diff algo, to detect image (source or alt) changes too.

FAQs

Package last updated on 11 Jul 2024

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