1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-02-01 13:18:29 +01:00

fix applying-custom-formatting.md demo (#1715)

This commit is contained in:
徐凯 2018-03-22 05:09:51 +08:00 committed by Ian Storm Taylor
parent 44d8021921
commit 09b15adb96

View File

@ -143,7 +143,7 @@ class App extends React.Component {
case '`': {
const isCode = change.value.blocks.some(block => block.type == 'code')
event.preventDefault()
value.setBlocks(isCode ? 'paragraph' : 'code')
change.setBlocks(isCode ? 'paragraph' : 'code')
return true
}
}