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