Bug Report: Hotkeys Stop Working After Switching Between Preview and Edit Modes
🐛 Bug Description
When using the Markdoc editor, keyboard shortcuts (hotkeys) stop functioning after switching from editing mode to preview mode and back to editing mode.
🔍 Steps to Reproduce
- Navigate to the editor page (
/create or /create/{id})
- Start typing in the editor textarea
- Test any hotkey (e.g.,
Ctrl+B for bold, Ctrl+I for italic, Ctrl+1 for heading 1)
- Click the "View preview" button
- Click the "Back to editing" button
- Try using the same hotkeys again
🎯 Expected Behavior
Hotkeys should continue to work normally after switching between preview and edit modes.
💻 Current Behavior
Hotkeys become unresponsive after returning from preview mode to editing mode.
Affected Hotkeys
All markdown formatting hotkeys are affected:
Ctrl+1 through Ctrl+6 - Headings
Ctrl+B - Bold
Ctrl+I - Italic
Ctrl+Shift+B - Bold Italic
Ctrl+S - Code snippet
Ctrl+Shift+C - Code block
Ctrl+Shift+. - Block quote
Ctrl+L - Link
Ctrl+Shift+I - Image
Ctrl+U - URL
Backspace - Select previous
Bug Report: Hotkeys Stop Working After Switching Between Preview and Edit Modes
🐛 Bug Description
When using the Markdoc editor, keyboard shortcuts (hotkeys) stop functioning after switching from editing mode to preview mode and back to editing mode.
🔍 Steps to Reproduce
/createor/create/{id})Ctrl+Bfor bold,Ctrl+Ifor italic,Ctrl+1for heading 1)🎯 Expected Behavior
Hotkeys should continue to work normally after switching between preview and edit modes.
💻 Current Behavior
Hotkeys become unresponsive after returning from preview mode to editing mode.
Affected Hotkeys
All markdown formatting hotkeys are affected:
Ctrl+1throughCtrl+6- HeadingsCtrl+B- BoldCtrl+I- ItalicCtrl+Shift+B- Bold ItalicCtrl+S- Code snippetCtrl+Shift+C- Code blockCtrl+Shift+.- Block quoteCtrl+L- LinkCtrl+Shift+I- ImageCtrl+U- URLBackspace- Select previous