1 | ;
|
2 |
|
3 | /**
|
4 | * User pressed Mod+Enter in an editor
|
5 | * Exit the current code block
|
6 | */
|
7 | function onModEnter(event, data, change, opts) {
|
8 | var state = change.state;
|
9 |
|
10 | if (!state.isCollapsed) {
|
11 | return;
|
12 | }
|
13 |
|
14 | event.preventDefault();
|
15 |
|
16 | // Exit the code block
|
17 | return opts.onExit(change, opts);
|
18 | }
|
19 |
|
20 | module.exports = onModEnter; |
\ | No newline at end of file |