def save(self): pagePath = self.getPagePath() print(" DROPBOX: saving page to {} ".format(pagePath)) try: exporter = XMLExporter(self.getPageDir(), self.getFilename()) xmlString = exporter.getXmlString(self.document) # NOTE: put_file stores a BINARY file, with no character encoding applied! fileData = bytes(xmlString, encoding='utf-8') self.notepad.client.put_file(pagePath, fileData, True) except ErrorResponse as rsp: print(str(rsp))
def activateXMLView(self): exporter = XMLExporter(self.editorWidget.page.getPageDir(), None) self.customView.setPlainText(exporter.getXmlString(self.editorWidget.editView.document()))
def activateXMLView(self): exporter = XMLExporter(self.editorWidget.page.getPageDir(), None) self.customView.setPlainText( exporter.getXmlString(self.editorWidget.editView.document()))