code: def insertText(self, data, parent=None):
          
          if parent is None:
              parent = self.openElements[-1]
  
          if (not self.insertFromTable or (self.insertFromTable and
                                           self.openElements[-1].name
                                           not in tableInsertModeElements)):
              parent.insertText(data)
          else:
              # We should be in the InTable mode. This means we want to do
              # special magic element rearranging
              parent, insertBefore = self.getTableMisnestedNodePosition()
              parent.insertText(data, insertBefore)
docs: Insert text data.