Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
prosemirror-history
Advanced tools
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.
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);
Yjs is a real-time collaborative framework that supports shared editing of rich-text documents. Unlike prosemirror-history, which focuses on undo and redo capabilities, Yjs provides a comprehensive approach to real-time collaboration, including conflict resolution and offline editing capabilities.
CKEditor 5's undo feature is part of the CKEditor rich-text editor framework. It provides similar undo and redo functionalities as prosemirror-history but is tightly integrated within the CKEditor ecosystem, making it less modular compared to the standalone prosemirror-history package.
[ WEBSITE | ISSUES | FORUM | 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.
1.3.1 (2023-04-26)
Fix an issue where, if a composition moved the selection, it might get split across multiple undo events.
FAQs
Undo history for ProseMirror
The npm package prosemirror-history receives a total of 1,283,728 weekly downloads. As such, prosemirror-history popularity was classified as popular.
We found that prosemirror-history demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.