This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
src/components/views/rooms Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ import * as RichText from '../../../RichText';
4646
4747const TYPING_USER_TIMEOUT = 10000 , TYPING_SERVER_TIMEOUT = 30000 ;
4848
49+ const KEY_M = 77 ;
50+
4951// FIXME Breaks markdown with multiple paragraphs, since it only strips first and last <p>
5052function mdownToHtml ( mdown ) {
5153 var html = marked ( mdown ) || "" ;
@@ -85,7 +87,7 @@ export default class MessageComposerInput extends React.Component {
8587
8688 static getKeyBinding ( e : SyntheticKeyboardEvent ) : string {
8789 // C-m => Toggles between rich text and markdown modes
88- if ( e . keyCode == 77 && KeyBindingUtil . isCtrlKeyCommand ( e ) ) {
90+ if ( e . keyCode == KEY_M && KeyBindingUtil . isCtrlKeyCommand ( e ) ) {
8991 return 'toggle-mode' ;
9092 }
9193
You can’t perform that action at this time.
0 commit comments