Skip to content

Commit ae80d8f

Browse files
committed
Integrates default template.
1 parent dc8073b commit ae80d8f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tkintermd/frame.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,12 @@ def on_input_change(self, event):
346346
md2html = Markdown(extensions=constants.extensions, extension_configs=constants.extension_configs)
347347
markdownText = self.text_area.get("1.0", END)
348348
html = md2html.convert(markdownText)
349+
template_top = constants.default_template_top
350+
template_bottom = constants.default_template_bottom
351+
final = f"{template_top}\n{html}\n{template_bottom}"
349352
self.export_options_text_area.delete("1.0" , END)
350-
self.export_options_text_area.insert(END, html)
351-
self.preview_document.load_html(html)
353+
self.export_options_text_area.insert(END, final)
354+
self.preview_document.load_html(final)
352355
self.preview_document.add_css(self.css)
353356
self.check_markdown_highlighting(start="1.0", end=END)
354357
self.text_area.edit_modified(0) # resets the text widget to generate another event when another change occours

0 commit comments

Comments
 (0)