DEV Community

Discussion on: Rich text editing on the web: Formatting text and keyboard shortcuts in Draft.js

Collapse
 
markomatijevic profile image
Marko-Matijevic • Edited

Hi, I loved your explanation. It helped me understand draft.js. There is small change you need to for strikethrough to work:

  • KeyBindingUtil.hasCommandModifier(event) && event.shiftKey && event.key === 'X' (it wont catch lowercased letter "x" because shift key was clicked)