1
0

jsoneditor_documentation.py 511 B

1234567891011121314151617
  1. from nicegui import ui
  2. def main_demo() -> None:
  3. ui.jsoneditor(properties={'content': {
  4. 'json': {
  5. 'array': [1, 2, 3],
  6. 'boolean': True,
  7. 'color': '#82b92c',
  8. None: None,
  9. 'number': 123,
  10. 'object': {'a': 'b', 'c': 'd'},
  11. 'time': 1575599819000,
  12. 'string': 'Hello World'
  13. }}},
  14. on_select=lambda e: ui.notify(f'Select: {e}'),
  15. on_change=lambda e: ui.notify(f'Change: {e}')).classes('w-full')