umd/fieldstack.js
/**
 * Delete the word that is right of the cursor, as well as any spaces or
 * punctuation before the word.
 */
Delete the word that is right of the cursor, as well as any spaces or
punctuation before the word.
Delete the word that is right of the cursor as well as any spaces or punctuation before the word .
function keyCommandDeleteWord(editorState) {
  var afterRemoval = removeTextWithStrategy_1(editorState, function (strategyState) {
    var selection = strategyState.getSelection();
    var offset = selection.getStartOffset();
    var key = selection.getStartKey();
    var content = strategyState.getCurrentContent();
    var text = content.getBlockForKey(key).getText().slice(offset);
    var toRemove = DraftRemovableWord_1.getForward(text);
    return moveSelectionForward_1(strategyState, toRemove.length || 1);
  }, 'forward');
  if (afterRemoval === editorState.getCurrentContent()) {
    return editorState;
  }
  return EditorState_1.push(editorState, afterRemoval, 'remove-range');
}
function keyCommandDeleteWord ( editorState ) { var afterRemoval = removeTextWithStrategy_1 ( editorState , function ( strategyState ) { var selection = strategyState . getSelection ( ) ; var offset = selection . getStartOffset ( ) ; var key = selection . getStartKey ( ) ; var content = strategyState . getCurrentContent ( ) ; var text = content . getBlockForKey ( key ) . getText ( ) . slice ( offset ) ; var toRemove = DraftRemovableWord_1 . getForward ( text ) ; return moveSelectionForward_1 ( strategyState , toRemove . length || 1 ) ; } , 'forward' ) ; if ( afterRemoval === editorState . getCurrentContent ( ) ) { return editorState ; } return EditorState_1 . push ( editorState , afterRemoval , 'remove-range' ) ; }
Delete the word that is right of the cursor, as well as any spaces or
 punctuation before the word.
Delete the word that is right of the cursor as well as any spaces or punctuation before the word .
// If there are no words in front of the cursor, remove the newline.