mirror of
https://github.com/codex-team/editor.js
synced 2026-03-16 15:45:47 +01:00
keyboard upd (shift + enter & enableLineBreaks)
This commit is contained in:
parent
a4099ca4ee
commit
17acac3d5d
3 changed files with 23 additions and 1 deletions
|
|
@ -2641,6 +2641,16 @@ var Keyboard = function (_Module) {
|
|||
|
||||
case _.keyCodes.ENTER:
|
||||
|
||||
if (this.config.toolsConfig[this.config.initialBlock] && this.config.toolsConfig[this.config.initialBlock].enableLineBreaks) {
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (event.shiftKey) {
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
_.log('Enter key pressed');
|
||||
this.enterPressed(event);
|
||||
break;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -38,6 +38,18 @@ export default class Keyboard extends Module {
|
|||
|
||||
case _.keyCodes.ENTER:
|
||||
|
||||
if (this.config.toolsConfig[this.config.initialBlock] && this.config.toolsConfig[this.config.initialBlock].enableLineBreaks) {
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (event.shiftKey) {
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
_.log('Enter key pressed');
|
||||
this.enterPressed(event);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue