Skip to content
This repository was archived by the owner on Oct 11, 2022. It is now read-only.

Commit 51536fc

Browse files
committed
Exit code block on shift+enter
1 parent 388d1e1 commit 51536fc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ function checkReturnForState(config, editorState, ev) {
187187
text.replace(/```\s*$/, "")
188188
);
189189
newEditorState = insertEmptyBlock(newEditorState);
190+
} else if (ev.shiftKey) {
191+
newEditorState = insertEmptyBlock(newEditorState);
190192
} else {
191193
newEditorState = insertText(editorState, "\n");
192194
}

0 commit comments

Comments
 (0)