MCPcopy Create free account
hub / github.com/SamyPesse/draft-js-code / handleReturn

Function handleReturn

lib/handleReturn.js:11–16  ·  view source on GitHub ↗

* We split code blocks only if user pressed Cmd+Enter * * @param {SyntheticKeyboardEvent} event * @param {Draft.EditorState} editorState * @return {Draft.EditorState}

(e, editorState)

Source from the content-addressed store, hash-verified

9 * @return {Draft.EditorState}
10 */
11function handleReturn(e, editorState) {
12 var contentState = editorState.getCurrentContent();
13 var selection = editorState.getSelection();
14
15 return insertNewLine(editorState);
16}
17
18module.exports = handleReturn;

Callers 1

Calls 1

insertNewLineFunction · 0.85

Tested by

no test coverage detected