mirror of
https://github.com/codex-team/editor.js
synced 2024-05-23 00:32:28 +02:00
linebreak configurations (#115)
This commit is contained in:
parent
6a63c76b15
commit
dae94e11e3
|
@ -2911,7 +2911,7 @@ var codex =
|
|||
* Codex Editor callbacks module
|
||||
*
|
||||
* @author Codex Team
|
||||
* @version 1.3.3
|
||||
* @version 1.3.4
|
||||
*/
|
||||
|
||||
var callbacks = function (callbacks) {
|
||||
|
@ -3024,7 +3024,7 @@ var codex =
|
|||
* Allow paragraph lineBreaks with shift enter
|
||||
* Or if shiftkey pressed and enter and enabledLineBreaks, the let new block creation
|
||||
*/
|
||||
if (event.shiftKey) {
|
||||
if (event.shiftKey || enableLineBreaks) {
|
||||
|
||||
event.stopPropagation();
|
||||
event.stopImmediatePropagation();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,7 +2,7 @@
|
|||
* Codex Editor callbacks module
|
||||
*
|
||||
* @author Codex Team
|
||||
* @version 1.3.3
|
||||
* @version 1.3.4
|
||||
*/
|
||||
|
||||
var callbacks = (function(callbacks) {
|
||||
|
@ -112,7 +112,7 @@ var callbacks = (function(callbacks) {
|
|||
* Allow paragraph lineBreaks with shift enter
|
||||
* Or if shiftkey pressed and enter and enabledLineBreaks, the let new block creation
|
||||
*/
|
||||
if ( event.shiftKey ){
|
||||
if ( event.shiftKey || enableLineBreaks ){
|
||||
|
||||
event.stopPropagation();
|
||||
event.stopImmediatePropagation();
|
||||
|
@ -128,7 +128,7 @@ var callbacks = (function(callbacks) {
|
|||
/**
|
||||
* Allow making new <p> in same block by SHIFT+ENTER and forbids to prevent default browser behaviour
|
||||
*/
|
||||
if ( event.shiftKey && !enableLineBreaks) {
|
||||
if ( event.shiftKey && !enableLineBreaks ) {
|
||||
codex.callback.enterPressedOnBlock(codex.content.currentBlock, event);
|
||||
event.preventDefault();
|
||||
return;
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue