@lexical/history
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -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>; | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16915
31
211
26
147
+ Added@lexical/list@0.2.1(transitive)
+ Added@lexical/table@0.2.1(transitive)
+ Added@lexical/utils@0.2.1(transitive)
+ Addedlexical@0.2.1(transitive)
- Removed@lexical/list@0.2.0(transitive)
- Removed@lexical/table@0.2.0(transitive)
- Removed@lexical/utils@0.2.0(transitive)
- Removedlexical@0.2.0(transitive)
Updated@lexical/utils@0.2.1