• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

SamyPesse / draft-js-code / 61
99%
master: 96%

Build:
Build:
LAST BUILD BRANCH: v0.3.0
DEFAULT BRANCH: master
Ran 24 Sep 2017 04:06PM UTC
Jobs 1
Files 12
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
61

push

travis-ci

mxstbr
Remove code block splitting

<kbd>CMD+ENTER</kbd> will no longer split code blocks.

If you need to, you can re-implement this in your app with a couple of
lines of code:

```JS
import { KeyBindingUtil, Modifier, EditorState } from 'draft-js';
class Editor extends React.Component {
  handleReturn = () => {
    const editorState = this.state.editorState;
    const contentState = editorState.getCurrentContent();
    const selection = editorState.getSelection();
    if (selection.isCollapsed() && KeyBindingUtil.hasCommandModifier(e)) {
      var newContentState = Modifier.splitBlock(contentState, selection);
      this.onChange(EditorState.push(editorState, newContentState, 'split-block'));
    }
    return;
  }
}
```

21 of 22 branches covered (95.45%)

Branch coverage included in aggregate %.

114 of 114 relevant lines covered (100.0%)

4.05 hits per line

Jobs
ID Job ID Ran Files Coverage
1 61.1 24 Sep 2017 04:06PM UTC 0
99.26
Travis Job 61.1
Source Files on build 61
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #61
  • 44c3a685 on github
  • Next Build on remove-block-splitting (#71)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc