@udecode/plate-indent
Advanced tools
Comparing version 11.1.0 to 11.2.0
# @udecode/plate-indent | ||
## 11.2.0 | ||
### Minor Changes | ||
- [#1560](https://github.com/udecode/plate/pull/1560) by [@zbeyens](https://github.com/zbeyens) – | ||
- fix: tab / untab when composing with IME | ||
- update peerDeps: | ||
- `"slate": ">=0.78.0"` | ||
- `"slate-react": ">=0.79.0"` | ||
## 11.1.0 | ||
@@ -4,0 +14,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { getPluginInjectProps, getNodeEntries, withoutNormalizing, unsetNodes, setElements, createPluginFactory, getPluginType, ELEMENT_DEFAULT } from '@udecode/plate-core'; | ||
import { getPluginInjectProps, getNodeEntries, withoutNormalizing, unsetNodes, setElements, Hotkeys, createPluginFactory, getPluginType, ELEMENT_DEFAULT } from '@udecode/plate-core'; | ||
@@ -71,6 +71,11 @@ /** | ||
const onKeyDownIndent = editor => e => { | ||
if (e.key === 'Tab' && !e.altKey && !e.ctrlKey && !e.metaKey) { | ||
if (Hotkeys.isTab(editor, e)) { | ||
e.preventDefault(); | ||
e.shiftKey ? outdent(editor) : indent(editor); | ||
indent(editor); | ||
} | ||
if (Hotkeys.isUntab(editor, e)) { | ||
e.preventDefault(); | ||
outdent(editor); | ||
} | ||
}; | ||
@@ -77,0 +82,0 @@ |
@@ -75,6 +75,11 @@ 'use strict'; | ||
const onKeyDownIndent = editor => e => { | ||
if (e.key === 'Tab' && !e.altKey && !e.ctrlKey && !e.metaKey) { | ||
if (plateCore.Hotkeys.isTab(editor, e)) { | ||
e.preventDefault(); | ||
e.shiftKey ? outdent(editor) : indent(editor); | ||
indent(editor); | ||
} | ||
if (plateCore.Hotkeys.isUntab(editor, e)) { | ||
e.preventDefault(); | ||
outdent(editor); | ||
} | ||
}; | ||
@@ -81,0 +86,0 @@ |
{ | ||
"name": "@udecode/plate-indent", | ||
"version": "11.1.0", | ||
"version": "11.2.0", | ||
"description": "Indent plugin for Plate", | ||
@@ -35,3 +35,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@udecode/plate-core": "11.1.0" | ||
"@udecode/plate-core": "11.2.0" | ||
}, | ||
@@ -41,5 +41,5 @@ "peerDependencies": { | ||
"react-dom": ">=16.8.0", | ||
"slate": ">=0.66.1", | ||
"slate": ">=0.78.0", | ||
"slate-history": ">=0.66.0", | ||
"slate-react": ">=0.74.2" | ||
"slate-react": ">=0.79.0" | ||
}, | ||
@@ -46,0 +46,0 @@ "publishConfig": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
43040
444
+ Added@udecode/plate-core@11.2.0(transitive)
- Removed@udecode/plate-core@11.1.0(transitive)
Updated@udecode/plate-core@11.2.0