1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 19:01:54 +02:00

fix hovering toolbar format hotkeys (#3667)

This commit is contained in:
whyour
2020-05-11 14:01:35 +08:00
committed by GitHub
parent a1ce4477c3
commit 08f7ef588c

View File

@@ -18,6 +18,7 @@ const HoveringMenuExample = () => {
renderLeaf={props => <Leaf {...props} />}
placeholder="Enter some text..."
onDOMBeforeInput={event => {
event.preventDefault()
switch (event.inputType) {
case 'formatBold':
return toggleFormat(editor, 'bold')