This commit is contained in:
Tim Bendt
2025-05-12 13:10:44 -06:00
parent 2fcad5700d
commit 64146abb4e
2 changed files with 62 additions and 48 deletions

View File

@@ -13,6 +13,7 @@ from widgets.EnvelopeHeader import EnvelopeHeader
class ContentContainer(ScrollableContainer):
"""A custom container that can switch between plaintext and markdown rendering."""
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.plaintext_mode = True
@@ -26,7 +27,7 @@ class ContentContainer(ScrollableContainer):
def compose(self) -> ComposeResult:
"""Compose the container with a label for plaintext and markdown for rich content."""
yield EnvelopeHeader()
yield Label(id="plaintext_content")
yield Label(id="plaintext_content", markup=False)
yield Markdown(id="markdown_content", classes="hidden")
def update_header(self, subject: str = "", date: str = "", from_: str = "", to: str = "", cc: str = "", bcc: str = "") -> None: