Browse Source

keyboard shortcut to switch to markdown

pull/96/head
Aaron Parecki 7 years ago
parent
commit
dfa7811da3
No known key found for this signature in database GPG Key ID: 276C2817346D6056
  1. 7
      views/new-post.php

7
views/new-post.php

@ -446,11 +446,16 @@ $(function(){
saveNoteState();
});
// Easter egg: press ctrl+shift+c to reveal a content type selection
$(document).bind('keydown', function(e){
// Easter egg: press ctrl+shift+c to reveal a content type selection
if(e.keyCode == 67 && e.ctrlKey && e.shiftKey) {
$("#content-type-selection").removeClass("hidden");
}
// Easter egg: press ctrl+shift+m to switch to markdown
if(e.keyCode == 77 && e.ctrlKey && e.shiftKey) {
$("#content-type-selection select").val("text/markdown");
$("#content-type-selection").removeClass("hidden");
}
});
});

Loading…
Cancel
Save