def show_template(self): from calibre.gui2.tweak_book.templates import raw_template_for syntax = self.current_syntax self.ignore_changes = True try: self.editor.load_text(raw_template_for(syntax), syntax=syntax) finally: self.ignore_changes = False