Skip to content

Commit

Permalink
Fix markdown elements (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi authored Feb 29, 2024
1 parent 2f86ce0 commit 7d86e75
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/viser/_gui_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 7d86e75

Please sign in to comment.