mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Add escape key to markdown toolbar #1831
This commit is contained in:
parent
20f3ff43fe
commit
b0d543b5fb
@ -1171,6 +1171,14 @@ define([
|
||||
var href = Messages.mdToolbar_tutorial;
|
||||
common.openUnsafeURL(href);
|
||||
}).appendTo($toolbar);
|
||||
|
||||
$toolbar.on('keydown', function (e) {
|
||||
if (e.key === 'Escape' || e.keyCode === 27) {
|
||||
editor.focus();
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
|
||||
return $toolbar;
|
||||
};
|
||||
UIElements.createMarkdownToolbar = function (common, editor, opts) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user