code: function trimNbspAfterDeleteAndPaddValue() {
          var rng, container, offset;
  
          rng = selection.getRng(true);
          container = rng.startContainer;
          offset = rng.startOffset;
  
          if (container.nodeType == 3 && rng.collapsed) {
            if (container.data[offset] === '\u00a0') {
              container.deleteData(offset, 1);
  
              if (!/[\u00a0| ]$/.test(value)) {
                value += ' ';
              }
            } else if (container.data[offset - 1] === '\u00a0') {
              container.deleteData(offset - 1, 1);
  
              if (!/[\u00a0| ]$/.test(value)) {
                value = ' ' + value;
              }
            }
          }
        }
docs: Removes &nbsp; from a [b] c -> a &nbsp;c -> a c