Socket
Socket
Sign inDemoInstall

prosemirror-history

Package Overview
Dependencies
6
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    prosemirror-history

Undo history for ProseMirror


Version published
Maintainers
1
Install size
1.74 MB
Created

Package description

What is prosemirror-history?

The prosemirror-history package is a module for ProseMirror, a toolkit for building rich-text editors. This package specifically provides functionality for undo and redo actions within the editor's history. It is essential for implementing non-linear history and tracking changes in the document state over time.

What are prosemirror-history's main functionalities?

Undo Functionality

This feature allows users to undo the last change made to the editor's document. The 'undo' function is used in conjunction with the 'history' plugin, which must be added to the editor's state configuration.

import { undo, history } from 'prosemirror-history';

const myEditorState = EditorState.create({
  plugins: [
    history()
  ]
});

// To undo the last change
undo(myEditorState);

Redo Functionality

This feature enables users to redo changes that were previously undone using the undo function. Similar to undo, the 'redo' function requires the 'history' plugin to be present in the editor's configuration.

import { redo, history } from 'prosemirror-history';

const myEditorState = EditorState.create({
  plugins: [
    history()
  ]
});

// To redo the last undone change
redo(myEditorState);

Other packages similar to prosemirror-history

Changelog

Source

1.1.3 (2019-12-10)

Bug fixes

Fixes a regression where appeneded transactions were combined into the previous history event even if that had been explicitly closed.

Readme

Source

prosemirror-history

[ WEBSITE | ISSUES | FORUM | GITTER | CHANGELOG ]

This is a 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.

This module implements an undo/redo history plugin for ProseMirror.

The project page has more information, a number of examples and the documentation.

This code is released under an MIT license. There's a forum for general discussion and support requests, and the Github bug tracker is the place to report issues.

We aim to be an inclusive, welcoming community. To make that explicit, we have a code of conduct that applies to communication around the project.

FAQs

Last updated on 10 Dec 2019

Did you know?

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc