code: def load_document(self, document, file=None, language=None):
          
  
          document.setDocumentLayout(QPlainTextDocumentLayout(document))
          self.setDocument(document)
          self.set_file(file)
          self.set_language(language)
          self.__set_document_signals()
  
          self.file_loaded.emit()
          return True
docs: Loads given document into the editor.
  
          :param document: Document to load.
          :type document: QTextDocument
          :param file: File.
          :type file: unicode
          :param language: Editor language.
          :type language: unicode
          :return: Method success.
          :rtype: bool