def insert(self, text: str):
        """
        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.
        """
        undoObj = UndoInsert(self, text)
        self.qteUndoStack.push(undoObj)
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.