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

@tiptap/extension-history

Package Overview
Dependencies
Maintainers
5
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tiptap/extension-history

history extension for tiptap

  • 2.10.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created

What is @tiptap/extension-history?

@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.

What are @tiptap/extension-history's main functionalities?

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

Other packages similar to @tiptap/extension-history

Keywords

FAQs

Package last updated on 22 Nov 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