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

what does the apply button do? #43

Open chanansh opened 1 year ago

chanansh commented 1 year ago

It's not clear what does the apply button do

renanxx1 commented 1 year ago

I'm facing the same difficult. I haven't found anything about the button or how to get the text return.

badayvedat commented 1 year ago

It is sad that docs do not mention it but you can access it using the return value of the component

result = st_ace('Type here', key='mytextarea')
print("Provided code:", result)
NichtJens commented 1 year ago

If auto_update=False, the editor only processes if this button is pressed. I.e., you'd only get the contents of the editor once the user is done, and presses apply.

If auto_update=True, the editor processes after every keystroke, and you get the contents as it changes for every change. The apply button is not shown in that case.

This button was introduced here: https://github.com/okld/streamlit-ace/issues/2

rimjhimittal commented 1 month ago

Want to be able to Change the text of Apply button or just hide the button without auto-updating