Editable text box

I have created a app for my shop and it goes like this. The user will paste input and there will be a submit button . When the user click on submit , it performs the cleaning of the input data based on the rules given and produces output in a box like shown in the word document

This output is non -editable by default.

I want to give a feature of editing to the output box for the user so that user can edit according to his need if there is any changes to be made

Can anyone tell me how to make this output textbox editable

Hi @Rakesh_Sh,

Try posting your code. It helps when answering questions.

You can optionally return the parsed data to a text area instead of a text field.

import streamlit as st

input_data = st.text_area("input")
parsed_data = cleaning_function() # Some function you've made to clean the input data

allow_editing = st.radio("Edit parsed data", [True, False])

if allow_editing:
    output = st.text_area("parsed data", value=parsed_data)
else:
    st.text(parsed_data)
1 Like