Richtext destroys form?

Hi,

I am experiencing issues with the richtext component.

How i can reproduce it:

  • Adding a richtext component to an empty form
  • Adding the following content to the richtext component (with ``` at start and end of the code)
    import requests 
    import time 

    URL = "https://someurlhere.com" 
    PARAMS = {"license_code": "hello"} 
    
    while True: 
    	resp = requests.get(url = URL, params = PARAMS) 
    	print(resp) 
    	time.sleep(30)
  • When running the app i get this error ExternalError: TypeError: Cannot set properties of undefined (setting 'domNode')
  • Back at the anvil designer, refresh the browser and now the form which contains the richtext component is completely blank

Am i doing something wrong?
I verified that the content above is being rendered correctly here StackEdit

https://anvil.works/build#clone:D4XQDGTMD5D663IA=INJJ76JJDUXFWQ5SN3CKYJ3H

Thanks for reporting. Moved to bug reports.

As a work around, you can try again by deleting the rich text. You’ll probably need to do this by selecting it from the component dropdown tree in the designer.

When you re-add the rich text component, before pasting in the content, make sure you turn off enable_slots.

1 Like