mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-09-01 19:22:35 +02:00
fix hovering toolbar format hotkeys (#3667)
This commit is contained in:
@@ -18,6 +18,7 @@ const HoveringMenuExample = () => {
|
|||||||
renderLeaf={props => <Leaf {...props} />}
|
renderLeaf={props => <Leaf {...props} />}
|
||||||
placeholder="Enter some text..."
|
placeholder="Enter some text..."
|
||||||
onDOMBeforeInput={event => {
|
onDOMBeforeInput={event => {
|
||||||
|
event.preventDefault()
|
||||||
switch (event.inputType) {
|
switch (event.inputType) {
|
||||||
case 'formatBold':
|
case 'formatBold':
|
||||||
return toggleFormat(editor, 'bold')
|
return toggleFormat(editor, 'bold')
|
||||||
|
Reference in New Issue
Block a user