okld / streamlit-ace

Ace editor component for Streamlit.
https://share.streamlit.io/okld/streamlit-gallery/main?p=ace-editor
MIT License
243 stars 36 forks source link

Loading a file into the Editor #25

Open dionyce opened 2 years ago

dionyce commented 2 years ago

How is It possible to load an already existing file into the streamlit-ace editor?

I am sorry, if this is not the right place to put the request. I am new to GitHub.

zsz00 commented 2 years ago
with open(cse_config_path, 'r') as f:
    cfg2_data = f.read()
    content = st_ace(value=cfg2_data)  

But this display is often not updated with the contents of the file change