code: def insert(self, text: str):
          
          undoObj = UndoInsert(self, text)
          self.qteUndoStack.push(undoObj)
docs: Undo safe wrapper for the native ``insert`` method.
  
          |Args|
  
          * ``text`` (**str**): text to insert at the current position.
  
          |Returns|
  
          **None**
  
          |Raises|
  
          * **QtmacsArgumentError** if at least one argument has an invalid type.