umd/fieldstack.js
/**
   * For collapsed selections at the start of styled blocks, backspace should
   * just remove the existing style.
   */
For collapsed selections at the start of styled blocks, backspace should
just remove the existing style.
For collapsed selections at the start of styled blocks backspace should just remove the existing style .
function onBackspace(editorState) {
    var selection = editorState.getSelection();
    if (!selection.isCollapsed() || selection.getAnchorOffset() || selection.getFocusOffset()) {
      return null;
    }
    var content = editorState.getCurrentContent();
    var startKey = selection.getStartKey();
    var blockBefore = content.getBlockBefore(startKey);
    if (blockBefore && blockBefore.getType() === 'atomic') {
      var blockMap = content.getBlockMap()['delete'](blockBefore.getKey());
      var withoutAtomicBlock = content.merge({
        blockMap: blockMap,
        selectionAfter: selection
      });
      if (withoutAtomicBlock !== content) {
        return EditorState_1.push(editorState, withoutAtomicBlock, 'remove-range');
      }
    }
    var withoutBlockStyle = RichTextEditorUtil.tryToRemoveBlockStyle(editorState);
    if (withoutBlockStyle) {
      return EditorState_1.push(editorState, withoutBlockStyle, 'change-block-type');
    }
    return null;
  }
function onBackspace ( editorState ) { var selection = editorState . getSelection ( ) ; if ( ! selection . isCollapsed ( ) || selection . getAnchorOffset ( ) || selection . getFocusOffset ( ) ) { return null ; } var content = editorState . getCurrentContent ( ) ; var startKey = selection . getStartKey ( ) ; var blockBefore = content . getBlockBefore ( startKey ) ; if ( blockBefore && blockBefore . getType ( ) === 'atomic' ) { var blockMap = content . getBlockMap ( ) [ 'delete' ] ( blockBefore . getKey ( ) ) ; var withoutAtomicBlock = content . merge ( { blockMap : blockMap , selectionAfter : selection } ) ; if ( withoutAtomicBlock !== content ) { return EditorState_1 . push ( editorState , withoutAtomicBlock , 'remove-range' ) ; } } var withoutBlockStyle = RichTextEditorUtil . tryToRemoveBlockStyle ( editorState ) ; if ( withoutBlockStyle ) { return EditorState_1 . push ( editorState , withoutBlockStyle , 'change-block-type' ) ; } return null ; }
For collapsed selections at the start of styled blocks, backspace should
 just remove the existing style.
For collapsed selections at the start of styled blocks backspace should just remove the existing style .
// First, try to remove a preceding atomic block. // If that doesn't succeed, try to remove the current block style.