Esempio n. 1
0
    def fix_html(self):
        if self.syntax == "html":
            from calibre.ebooks.oeb.polish.pretty import fix_html

            self.editor.replace_text(fix_html(current_container(), unicode(self.editor.toPlainText())).decode("utf-8"))
            return True
        return False
Esempio n. 2
0
 def fix_html(self):
     if self.syntax == 'html':
         from calibre.ebooks.oeb.polish.pretty import fix_html
         self.editor.replace_text(
             fix_html(current_container(),
                      unicode(self.editor.toPlainText())).decode('utf-8'))
         return True
     return False
Esempio n. 3
0
 def fix_html(self):
     from calibre.ebooks.oeb.polish.pretty import fix_html
     self.replace_text(fix_html(unicode(self.toPlainText())).decode('utf-8'))