1
0
Эх сурвалжийг харах

add demo on how to change markdown content

Rodja Trappe 1 жил өмнө
parent
commit
bfae244ab5

+ 11 - 0
website/documentation/content/markdown_documentation.py

@@ -55,4 +55,15 @@ def markdown_tables():
     ''', extras=['tables'])
 
 
+@doc.demo('Change Markdown content', '''
+    You can change the content of a markdown element by changing its `content` property.
+''')
+def markdown_tables():
+    markdown = ui.markdown('Sample content')
+    ui.button('Change Content', on_click=lambda: change_content())
+
+    def change_content():
+        markdown.content = 'This is new content'
+
+
 doc.reference(ui.markdown)