Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
@tiptap/extension-history
Advanced tools
@tiptap/extension-history is an extension for the Tiptap editor that provides undo and redo functionality. It allows users to revert changes or reapply them, enhancing the editing experience by providing a way to navigate through the history of changes made to the document.
Undo
This feature allows users to undo the last action performed in the editor. The configuration options allow setting the maximum number of history events and the delay for creating a new group of actions.
import { Editor } from '@tiptap/core';
import History from '@tiptap/extension-history';
const editor = new Editor({
extensions: [
History.configure({
depth: 100, // Maximum number of history events
newGroupDelay: 500 // Time in ms to create a new group
})
]
});
// To undo the last action
editor.commands.undo();
Redo
This feature allows users to redo the last undone action in the editor. Similar to the undo feature, it can be configured with options for the maximum number of history events and the delay for creating a new group of actions.
import { Editor } from '@tiptap/core';
import History from '@tiptap/extension-history';
const editor = new Editor({
extensions: [
History.configure({
depth: 100, // Maximum number of history events
newGroupDelay: 500 // Time in ms to create a new group
})
]
});
// To redo the last undone action
editor.commands.redo();
prosemirror-history is a package for ProseMirror that provides undo and redo functionality. It is similar to @tiptap/extension-history as Tiptap is built on top of ProseMirror. The main difference is that @tiptap/extension-history is specifically designed to integrate seamlessly with the Tiptap editor, while prosemirror-history is a more general solution for any ProseMirror-based editor.
slate-history is an extension for the Slate editor that provides undo and redo functionality. It is similar to @tiptap/extension-history in that it allows users to navigate through the history of changes made to the document. However, it is designed specifically for the Slate editor, which has a different architecture and API compared to Tiptap.
tiptap is a headless wrapper around ProseMirror – a toolkit for building rich text WYSIWYG editors, which is already in use at many well-known companies such as New York Times, The Guardian or Atlassian.
Documentation can be found on the tiptap website.
tiptap is open-sourced software licensed under the MIT license.
FAQs
history extension for tiptap
The npm package @tiptap/extension-history receives a total of 848,188 weekly downloads. As such, @tiptap/extension-history popularity was classified as popular.
We found that @tiptap/extension-history demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers 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.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.