From 2bfbdf11c66bd4664a49f4227d21ee5585ae392a Mon Sep 17 00:00:00 2001 From: Brent Yi Date: Wed, 28 Feb 2024 20:42:01 -0800 Subject: [PATCH] Fix markdown elements --- src/viser/_gui_api.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/viser/_gui_api.py b/src/viser/_gui_api.py index 56d2598a3..bf7ceec9b 100644 --- a/src/viser/_gui_api.py +++ b/src/viser/_gui_api.py @@ -333,8 +333,18 @@ def add_gui_markdown( _image_root=image_root, _content=None, ) + self._get_api()._queue( + _messages.GuiAddMarkdownMessage( + order=handle._order, + id=handle._id, + markdown="", + container_id=handle._container_id, + visible=visible, + ) + ) - # Assigning content will send a GuiAddMarkdownMessage. + # Logic for processing markdown, handling images, etc is all in the + # `.content` setter, which should send a GuiUpdateMessage. handle.content = content return handle