code: def reverseCommit(self):
          
  
          # Move the cursor to the right of the text to delete.
          tc = self.qteWidget.textCursor()
  
          # Delete as many characters as necessary. For an image that would
          # be exactly 1 even though the HTML code to embed that image is usually
          # longer. For text, it would be as many characters as the pasted text
          # was long.
          if self.isImage:
              dataLen = 1
          else:
              dataLen = len(self.data)
  
          tc.setPosition(self.selStart + dataLen, QtGui.QTextCursor.MoveAnchor)
          for ii in range(dataLen):
              tc.deletePreviousChar()
  
          # Add the previously selected text (this may be none).
          tc.insertHtml(self.selText)
          self.qteWidget.setTextCursor(tc)
docs: Remove the inserted character(s).