Skip to content

Commit 88aab18

Browse files
committed
Fixed Exit full screen when ESC is pressed.
1 parent 490597f commit 88aab18

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

README.rst

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,23 @@ martor |pypi version|
1414
.. image:: https://img.shields.io/badge/Django-1.8,%201.9,%201.10,%201.11-green.svg?style=flat-square
1515
:target: https://www.djangoproject.com
1616

17-
.. image:: https://img.shields.io/pypi/dm/martor.svg?style=flat-square
18-
:target: https://pypi.python.org/pypi/martor
19-
2017

21-
**Martor** is a Django Markdown Editor and new face of **DracEditor**.
18+
**Martor** is Markdown Editor plugin for Django and new face of **DracEditor**.
2219

2320

2421
Features
2522
------------------------------
2623

24+
* Live Preview
2725
* Integrated with `Ace Editor`_
2826
* Integrated with `Semantic-UI`_
29-
* Live Preview
3027
* Support Multiple Fields (`fixed this issue`_)
31-
* Upload Image to imgur.com `(via API)`
32-
* Emoji ``:emoji_name:`` + Cheat sheet
28+
* Upload Image to imgur.com `(via API)` and `custom uploader`_.
3329
* Direct Mention users ``@[username]`` - `(require user to logged in)`
30+
* Emoji ``:emoji_name:`` + Cheat sheets
31+
* Martor Commands Refference
32+
* Support Django Admin
3433
* Highlight ``pre``
35-
* Django Admin support
3634
* Toolbar Buttons
3735

3836

@@ -252,3 +250,4 @@ Notes
252250
.. _Online reStructuredText editor: http://rst.ninjs.org
253251
.. _WIKI: https://github.com/agusmakmun/django-markdown-editor/wiki
254252
.. _fixed this issue: https://github.com/agusmakmun/django-markdown-editor/issues/3
253+
.. _custom uploader: https://github.com/agusmakmun/django-markdown-editor/wiki

martor/static/martor/js/martor.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,13 @@
743743
handleToggleMaximize($(this));
744744
});
745745

746+
// Exit full screen when `ESC` is pressed.
747+
$(document).keyup(function(e) {
748+
if (e.keyCode == 27 && mainMartor.hasClass('main-martor-fullscreen')) {
749+
$('.minimize.icon').trigger('click');
750+
}
751+
});
752+
746753
// markdown insert emoji from the modal
747754
$('.markdown-emoji[data-field-name='+field_name+']').click(function(){
748755
var modalEmoji = $('.modal-emoji[data-field-name='+field_name+']');

0 commit comments

Comments
 (0)