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

@lexical/history

Package Overview
Dependencies
Maintainers
3
Versions
211
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lexical/history - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

6

package.json

@@ -11,9 +11,9 @@ {

"license": "MIT",
"version": "0.2.0",
"version": "0.2.1",
"main": "LexicalHistory.js",
"peerDependencies": {
"lexical": "0.2.0"
"lexical": "0.2.1"
},
"dependencies": {
"@lexical/utils": "0.2.0"
"@lexical/utils": "0.2.1"
},

@@ -20,0 +20,0 @@ "repository": {

@@ -21,9 +21,11 @@ # `@lexical/history`

History package handles `undo`, `redo` and `clearHistory` commands. It also triggers `canUndo` and `canRedo` commands when history state is changed. These commands could be used to work with history state:
History package handles `UNDO_COMMAND`, `REDO_COMMAND` and `CLEAR_HISTORY_COMMAND` commands. It also triggers `CAN_UNDO_COMMAND` and `CAN_REDO_COMMAND` commands when history state is changed. These commands could be used to work with history state:
```jsx
import {UNDO_COMMAND, REDO_COMMAND} from 'lexical';
<Toolbar>
<Button onClick={() => editor.dispatchCommand('undo')}>Undo</Button>
<Button onClick={() => editor.dispatchCommand('redo')}>Redo</Button>
</Toolbar>
<Button onClick={() => editor.dispatchCommand(UNDO_COMMAND)}>Undo</Button>
<Button onClick={() => editor.dispatchCommand(REDO_COMMAND)}>Redo</Button>
</Toolbar>;
```
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